Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

hypixie

Richienb12MIT1.0.0TypeScript support: included

A simplified interface for the Hypixel api.

hypixel, api, wrapper, request, layer, simple, interface

readme

hypixie Travis CI Build Status

A simplified interface for the Hypixel api.

NPM Badge

Install

npm install hypixie

Usage

const hypixie = require("hypixie");

(async () => {
    const { displayname } = await hypixie("player", {
        uuid: "56da43a4-088d-4a76-82b6-dd431535015e",
        key: "some api key"
    });

    console.log(displayname);
    //=> "Richienb"
})();

API

hypixie(endpoint, options)

endpoint

Type: string

The API endpoint to call.

options

Type: object

The options to pass to the API.

hypixie.HypixelError

Exposed for instanceof checks. This type of error is thrown when the API returns an error.