npm.io
0.3.1 • Published 2 years ago

albion

Licence
LGPL-2.1-or-later
Version
0.3.1
Deps
0
Size
40 kB
Vulns
0
Weekly
0
Stars
4

Albion API

NodeJS module to interact with the Albion Online API.
Currenly limited in scope, aiming at nearly full (known, see this) coverage.
This project is not recomended for production in this stage of developement, a lot of breaking-changes are expected in the following versions.
Note: Not affiliated with neither Albion Online nor Sandbox Interactive.

Instalation

npm install albion

Example

const AlbionAPI = require('albion');

const playerName = 'aurora60';

AlbionAPI.getPlayerByName(playerName).then(player => {
    if(player === null) return console.log('Player not found!');

    if(player.guild !== null) console.log(`The name of ${player.name}'s guild is ${player.guild.name}.`);
    else console.log(`${player.name} doesn't have a guild.`);
});

Docs

Not ready yet! But you can try these functions while you wait:

  • AlbionAPI.getPlayerById(id);
  • AlbionAPI.getPlayerByName(name);
  • AlbionAPI.getGuildById(id);
  • AlbionAPI.getGuildByName(name);
  • AlbionAPI.getAllianceById(id);

hint: loot at this file

Keywords