minehut
TypeScript icon, indicating that this package has built-in type declarations

0.0.74 • Public • Published

Minehut

A TypeScript wrapper for the Minehut HTTP API

Installation

Install minehut with NPM

  npm install minehut

Features

  • Get basic Minehut network information.
  • Get information about a Minehut server.
  • Get a list of online servers.
  • Get information about server icons and categories.
  • Get information about a Minehut player such as their rank, friends, and if they are online.

Basic Usage

const minehut = new Minehut();

async function main() {
    const stats = await minehut.getSimpleStats();
    console.log(stats);

    const lifestealServers = await minehut.servers.getOnlineServers({ category: "lifesteal" });
    console.log(lifestealServers);

    const player = await minehut.players.get('_Tarna_');
    console.log(player);
}

For more examples, visit example.ts.

Notice

Due to the server list endpoint being protected by Cloudflare, the minehut.servers.getOnlineServers() method will only work with the puppeteer option set to true when using Node.js. It will work fine if you are using Bun.

Contributing

Contributions are always welcome!

See contributing.md for ways to get started.

License

MIT

Contributors

Readme

Keywords

none

Package Sidebar

Install

npm i minehut

Weekly Downloads

86

Version

0.0.74

License

MIT

Unpacked Size

64.2 kB

Total Files

47

Last publish

Collaborators

  • jellz
  • tarna256