https://github.com/gw2efficiency/account-statistics
Calculate statistics of guildwars2 accounts
https://github.com/gw2efficiency/account-statistics
maintained npm-package
Last synced: 3 months ago
JSON representation
Calculate statistics of guildwars2 accounts
- Host: GitHub
- URL: https://github.com/gw2efficiency/account-statistics
- Owner: gw2efficiency
- License: mit
- Created: 2016-08-19T19:06:44.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2025-06-29T15:14:03.000Z (3 months ago)
- Last Synced: 2025-07-14T01:49:56.969Z (3 months ago)
- Topics: maintained, npm-package
- Language: JavaScript
- Size: 413 KB
- Stars: 8
- Watchers: 2
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# account-statistics
[](https://travis-ci.org/gw2efficiency/account-statistics)
[](https://codecov.io/github/gw2efficiency/account-statistics)> Calculate statistics of guildwars2 accounts
*This is part of [gw2efficiency](https://gw2efficiency.com). Please report all issues in [the central repository](https://github.com/gw2efficiency/issues/issues).*
## Install
```
npm install gw2e-account-statistics
```This module can be used for Node.js as well as browsers using [Browserify](https://github.com/substack/browserify-handbook#how-node_modules-works).
## Usage
### Calculate the statistics
```js
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.
```js
import unlocks from 'gw2e-account-statistics/build/statistics/unlocks'unlocks(accountData)
// -> Only the "unlocks" statistics
```## Tests
```
npm test
```## Licence
MIT