An API wrapper for Tanki Online ratings.
Install
$ npm i tankionline.js
Examples
Ratings
const tankionline = require("tankionline.js");
const Ratings = new tankionline.ratings('GeopJr', 'en');
Ratings.stats().then(data => {
console.log(data)
console.log(data.kd)
}).catch(error => { console.log(error)});
Ranks
const tankionline = require("tankionline.js");
const Rank = new tankionline.ranks(true, 1);
Rank.then(data => {
console.log(data.rank.name)
console.log(data.rank.image)
}).catch(error => { console.log(error)});
Top
const tankionline = require("tankionline.js");
const Top = new tankionline.top("crystals");
Top.then(data => {
console.log(data.top[0].value)
}).catch(error => { console.log(error)});
More info in the Wiki