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

0.0.1 • Public • Published

mine-api

mine-api is a simple wrapper around the Minecraft API. The package is really lightweight and does use Promises as retuntype.

Installation

npm install --save mine-api

Usage

MinecraftAPI.uuidForName(username)

Parameters:

  • username: The username to resolve the UUID for

Example:

const MinecraftAPI = require('mine-api');
 
function foo() {
    MinecraftAPI.uuidForName('jeb_')
        .then(uuid => console.log(uuid))
        .catch(err => console.log(err))
}

Example (async/await):

const MinecraftAPI = require('mine-api');
 
async function foo() {
    try{
        const uuid = await MinecraftAPI.uuidForName('jeb_'); 
        console.log(uuid);
    } catch(err){
        console.error(err);
    }
}

Readme

Keywords

Package Sidebar

Install

npm i mine-api

Weekly Downloads

2

Version

0.0.1

License

MIT

Unpacked Size

10 kB

Total Files

5

Last publish

Collaborators

  • zachary_murphy