1.1.5 • Published 4 years ago

hylaria-lib v1.1.5

Weekly downloads
7
License
MIT
Repository
github
Last release
4 years ago

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

1.1.5

4 years ago

1.1.4

4 years ago

1.1.3

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago