mcapi

An unofficial Node.js library for fetching data from Mojang

  • mcapi

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
mcapi
101.0.15 years ago5 years agoMinified + gzip package size for mcapi in KB

Readme

mcapi
An unofficial Node.js library for fetching data from Mojang
Get user data, translate usernames <-> UUID's, get username history and more with promises.

Install

To install mcapi simply run ```
npm install -s mcapi
```

Usage

First import the library using: ```js
const mcapi = require('mcapi');
``` To get the corresponding UUID of a username simply type: ```js
let uuid = await mcapi.usernameToUUID("Deftware");
```

oAuth

This library also supports MC-oAuth, to use oAuth simply type: ```js
let uuid = await mcapi.oAuthToUUID("<6 digit oauth code>");
``` You get the 6 digit oauth code from joining srv.mc-oauth.net with your Minecraft client.