gw2e-account-statistics

3.14.1 • Public • Published

account-statistics

Build Status Coverage Status

Calculate statistics of guildwars2 accounts

This is part of gw2efficiency. Please report all issues in the central repository.

Install

npm install gw2e-account-statistics

This module can be used for Node.js as well as browsers using Browserify.

Usage

Calculate the statistics

import accountStatistics from 'gw2e-account-statistics'

// An object containing all the account data available for the API key
const accountData = {
  account: /* ... */,
  characters: /* ... */,
  bank: /* ... */,
  materials: /* ... */,
  commerce: {
    buys: /* ... */,
    sells: /* ... */
  },
  skins: /* ... */,
  wallet: /* ... */,
  dyes: /* ... */,
  minis: /* ... */,

  outfits: /* ... */,
  recipes: /* ... */,
  guilds: /* ... */,
  inventory: /* ... */,

  titles: /* ... */,
  achievements: /* ... */,
  pvp: {
    stats: /* ... */,
    // ...
  }
}

// Extra information for context-dependent statistics
const extraInformation = {
  pvp: { currentSeason: 'SEASON-ID' },
  skins: { typeMap: { Armor: [1, 2, 3], Weapon: [1, 2, 3], Back: [1, 2, 3] } }
}

// Calculate everything!
accountStatistics(accountData, extraInformation)
// -> Object with all statistics calculated

Calculate a part of the account statistics

You can import the partial calculations on their own and work with them.

import unlocks from 'gw2e-account-statistics/build/statistics/unlocks'

unlocks(accountData)
// -> Only the "unlocks" statistics

Tests

npm test

Licence

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i gw2e-account-statistics

Weekly Downloads

11

Version

3.14.1

License

MIT

Unpacked Size

456 kB

Total Files

82

Last publish

Collaborators

  • queicherius