Skip to content

Latest commit

 

History

16 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

npm version npm downloads typescript

An unofficial Node.js wrapper for the Mush API. Handling all the annoying stuff for you!

Note

The typings were generated based on data collected from multiple players and may be wrong and change over time.

📦 Installation

Requires Node.js 18 or higher.
Package Manager Command
npm npm install mush-api.js
pnpm pnpm add mush-api.js
yarn yarn add mush-api.js

📡 Usage

import * as mush from "mush-api.js";
// const mush = require("mush-api.js");

try {
  const player = await mush.getPlayer("yPandinho");

  console.log(player.username);     // yPandinho
  console.log(player.rank.name);    // Admin
  console.log(player.bedwars.wins); // 29
} catch (error) {
  if (error instanceof mush.MushAPIJSError) {
    console.log(error.message);    // Entity not found
    console.log(error.statusCode); // 404
  }
}

⭐ Contributing

Contributions are always welcome! You can contribute by opening a pull request or submitting a bug or feature idea.

About

Unofficial Mush API wrapper for Node.js

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages