mcapi

1.0.1 • Public • Published

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:

    const mcapi = require('mcapi');

To get the corresponding UUID of a username simply type:

    let uuid = await mcapi.usernameToUUID("Deftware");

oAuth

This library also supports MC-oAuth, to use oAuth simply type:

    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.

Package Sidebar

Install

npm i mcapi

Weekly Downloads

10

Version

1.0.1

License

GPL-3.0

Unpacked Size

38.2 kB

Total Files

5

Last publish

Collaborators

  • deftware