Socket
Book a DemoInstallSign in
Socket

albion-online-api

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

albion-online-api

WIP API Library for Albion Online

0.0.3
latest
npmnpm
Version published
Weekly downloads
3
-50%
Maintainers
1
Weekly downloads
 
Created
Source

Just a basic API Library for Albion Online. (I do not play the game. I was supposed to write this as a task in r/slavelabour.)

How To Use

Functions

.getPlayerInfo

Parameter: Object

  • playerName {String} - Player Username (Case-insensitive)

  • playerId {String} - Player ID (Case-sensitive)

You only need one of each. If both parameters are passed, the ID will be used

const albion = require('albion-online-api');

albion.getPlayerInfo({playerName: 'test0005'}).then(data => {
    console.log(data);
}).catch(console.error)
// [Object object]

albion.getPlayerInfo({playerName: 'test'}).then(data => {
    console.log(data);
}).catch(console.error)
// Player Not Found

albion.getPlayerInfo({playerId: 'pm1P1jF3TeyaSaeL1g0Seg'}).then(data => {
    console.log(data);
}).catch(console.error)
// [Object object]

.getGuildInfo

Parameter: Object

  • guildName {String} - Guild Name (Case-insensitive)

  • guildId {String} - Guild ID (Case-sensitive)

You only need one of each. If both parameters are passed, the ID will be used

const albion = require('albion-online-api');

albion.getGuildInfo({guildName: 'Test 123'}).then(data => {
    console.log(data);
}).catch(console.error)
// [Object object]

albion.getGuildInfo({guildName: 'test'}).then(data => {
    console.log(data);
}).catch(console.error)
// Guild Not Found

albion.getGuildInfo({guildId: 'Pofs7UvDTvC2ODQH1yRGWA'}).then(data => {
    console.log(data);
}).catch(console.error)
// [Object object]

Events

A VERY crappy implementation. I'm gonna fix this in the future.

const albion = require('albion-online-api');

const Events = new albion.Events();

Events.on('event', (data) => {
    console.log(data) // [Object object]
})
Events.listen();

Keywords

albion

FAQs

Package last updated on 27 Jul 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.