Moudoux / node-mojang

Unofficial Node.js library for Mojang's HTTP APIs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mojang Build Status Coverage

Unofficial Node.js library for Mojang's HTTP APIs

Create sessions, get user info, change skins, and more with promises.

Includes the functions described on the Minecraft modern wiki, as well as several equally-important but undocumented endpoints. Every function makes a single request. This library requires Internet access to do anything.

Please use GitHub Issues to submit a bug, request new examples, or report a missing feature. Pull requests welcome.

Install

$ npm install mojang

Usage

Read the documentation or look in examples/ and test/ folders.

const mojang = require('mojang')

mojang.authenticate({username, password})
  .then(session => mojang.getUser(session))
  .then(user => console.info(user))
  .catch(err => console.error(err))

Related

  • mojang-api - small library for some Mojang username and profile endpoints
  • yggdrasil - PrismarineJS's Mojang authentication with server joining

License

MIT © Jamen Marzonie

Ownership transferred from jamen/node-mojang.

This repository is not affiliated with Mojang.

"Minecraft" is a trademark of Mojang Synergies AB.

About

Unofficial Node.js library for Mojang's HTTP APIs

License:MIT License


Languages

Language:JavaScript 100.0%