1.0.3 • Published 5 years ago
r6statsapi v1.0.3
R6StatsAPI
Unofficial R6Stats API client library for Node.js.
Example
const R6StatsAPI = require('r6statsapi').default;
const API = new R6StatsAPI('your-token-here');
API.getGenericStats('Kev.-', 'pc', 'all').then(userStats => {
console.log(userStats.stats.general.barricades_deployed); // 1089
});
// or with async/await
let userStats = await API.getGenericStats('Kev.-', 'pc', 'all');
console.log(userStats.stats.general.barricades_deployed); // 1089
Available Methods
All methods return a Promise
with the stats.
getLeaderboard(platform, region, page)
Get the R6Stats leaderboard. The leaderboard is limited to 50 pages.
platform
: The platform of the gameregion
: The region of the leaderboard, default isall
page
: The page of the leaderboard, default is0
getGenericStats(username, platform)
Get general statistics for a player.
username
: The username of the playerplatform
: The platform the player plays the game on
getSeasonalStats(username, platform)
Get seasonal statistics for a player.
username
: The username of the playerplatform
: The platform the player plays the game on
getOperatorStats(username, platform)
Get operator statistics for a player.
username
: The username of the playerplatform
: The platform the player plays the game on
getWeaponCategoryStats(username, platform)
Get weapon statistics by category for a player.
username
: The username of the playerplatform
: The platform the player plays the game on
getWeaponStats(username, platform)
Get weapon statistics for a player.
username
: The username of the playerplatform
: The platform the player plays the game on
_getStats(username, platform, type)
Get game stats about a specific player.
username
The username of the playerplatform
The platform the player plays the game ontype
The type of stats the request