albion
v0.3.1
Published
NodeJS module to interact with the Albion Online API
Downloads
27
Readme
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