JSPM

hypixie

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q27682F
  • License MIT

A simplified interface for the Hypixel api.

Package Exports

  • hypixie

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (hypixie) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

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.