Get player rankings and elo from challonge tournaments.
npm install --save challonge-elo-nodejs
const challongeElo = require('challonge-elo-nodejs');
const config = {
tournaments: [
{
api_key: 'my_challonge_api_key',
subdomain: 'roaeurope',
tournament_urls: ['untamed6']
}
],
elo_multiplier: 2
};
challongeElo.getStats(config).then((stats) => {
...
});
Type: array
of tournament
Type: string
Your challonge api key, you can get it here.
Type: string
The subdomain of the organization.
e.g. for http://roaeurope.challonge.com : 'roaeurope'
Type: array
of string
The path of each tournament, at the end of the tournament url. They don't need to be sorted.
e.g. for http://roaeurope.challonge.com/untamed6 : 'untamed6'
Type: number
Defaults to 1
The elo K-factor will be multiplied by this number.
The method returns a promise that resolves to player stats.
Type: array
of player
.
An array of players with their infos and rankings. Sorted by rank (#1 first).
Type: number
.
Type: number
.
Type: number
.
Type: number
.
Type: number
.
Type: string
.
Type: array
of match
.
Type: string
.
The name of the opponent.
Type: string
.
The result, win
or lose
Type: string
.
The gain/loss of elo.
Type: number
.
The elo before the match.
Type: number
.
The elo after the match
Type: array
of tournament info
.
Tournament infos, sorted by date (most recent first).
Type: string
.
The full name of the tournament on challonge.
Type: string
.
The full url of the tournament on challonge.