hylaria-lib

1.1.5 • Public • Published

NPM version NPM downloads

Hylaria-Lib

Table of contents

About

Hylaria-Lib is a powerful Node.js module that allows you to easily interact with the Hylaria API

Installation

Using npm

  $ npm i hylaria-lib

Using yarn

  $ yarn add hylaria-lib

Getting started

Fetch Player

  // CommonJS usage
  const hylaria = require('hylaria-lib');

  // Fetch an user named Yumekowo
  hylaria.fetchPlayer('Yumekowo')
    .then(function (player) {
      // can now interact with Player instance
      console.log(player.username);
    })
    .catch(function (error) {
      // handle error
      console.error(error);
    });

  // You can also fetch a player by his UUID
  hylaria.fetchPlayer('9581c43c2b9d4fbdb3de91115363c3ce')
    .then(function (player) {
      // can now interact with Player instance
      console.log(player.username);
    })
    .catch(function (error) {
      // handle error
      console.error(error);
    });

Fetch Server

  // CommonJS usage
  const hylaria = require('hylaria-lib');

  // Fetch Hypixel
  hylaria.fetchServer('play.hypixel.net')
    .then(function (server) {
      // can now interact with Server instance
      console.log(server.address);
    })
    .catch(function (error) {
      // handle error
      console.error(error);
    });

  // You can also provide a server port
  hylaria.fetchServer('play.hypixel.net', 25565)
    .then(function (server) {
      // can now interact with Server instance
      console.log(server.address);
    })
    .catch(function (error) {
      // handle error
      console.error(error);
    });

More things are available in the documentation: docs.hylaria.com

Links

Readme

Keywords

none

Package Sidebar

Install

npm i hylaria-lib

Weekly Downloads

0

Version

1.1.5

License

MIT

Unpacked Size

19.3 kB

Total Files

12

Last publish

Collaborators

  • 0x394