Hypixel & Mojang API for Node.js
JS wrapper for the Hypixel and Mojang APIs.

Installation
npm install hypixel-node
Initializing Classes
const {Hypixel, Mojang} = require('hypixel-node');
const hypixel = new Hypixel(HYPIXEL_API_KEY);
const mojang = new Mojang();
Hypixel API
Example
const {Hypixel} = require('hypixel-node');
const hypixel = new Hypixel(HYPIXEL_API_KEY);
hypixel.getPlayer('Hypixel', (error, player) => {
if (error)
return console.log(error);
console.log(player)
});
hypixel.findGuildByPlayer('Hypixel')
.then( guild => { ... })
.catch( error => { ... });
Functions
| getKeyInfo | | record |
| getBoosters | | boosters |
| getLeaderboards | | leaderboards |
| getOnlinePlayers | | playerCount |
| getWatchdogStats | | [object] |
| getGuildByName | name | guild |
| getGuildByPlayer | uuid | guild |
| getGuild | id | guild |
| getFriends | uuid | records |
| getSession | uuid | session |
| getPlayer | name/uuid | player |
Methods
| player | getLevel | Returns the Hypixel level for the player. | Number |
| getRank | Returns the rank of the player. | String |
| isOnline | Returns 'true' of the player is online. | Boolean |
| | | |
| guild | getGuildLevel | Returns information about the guild's level. | Object |
Mojang API
Example
const {Mojang} = require('hypixel-node');
const mojang = new Mojang();
mojang.getUUID('Hypixel', (error, uuid) => {
if (error)
return console.log(error);
console.log(uuid)
});
mojang.getNameHistory('Hypixel')
.then( guild => { ... })
.catch( error => { ... });
Functions
| getKeyInfo | | record |
| getBoosters | | boosters |
| getLeaderboards | | leaderboards |
| getOnlinePlayers | | playerCount |
| getWatchdogStats | | [object] |
| getGuildByName | name | guild |
| getGuildByPlayer | uuid | guild |
| getGuild | id | guild |
| getFriends | uuid | records |
| getSession | uuid | session |
| getPlayer | name/uuid | player |
License
MIT