2.0.4 • Published 4 years ago

tankionline.js v2.0.4

Weekly downloads
22
License
MIT
Repository
github
Last release
4 years ago

Install

$ npm i tankionline.js

Examples

Ratings

// Initialize
const tankionline = require("tankionline.js");

const Ratings = new tankionline.ratings('GeopJr', 'en');

Ratings.stats().then(data => {
console.log(data)
// JSON object
console.log(data.kd)
// 2.99
}).catch(error => { console.log(error)});
// Catch errors

Ranks

// Initialize
const tankionline = require("tankionline.js");

const Rank = new tankionline.ranks(true, 1);

Rank.then(data => {
console.log(data.rank.name)
//=> Recruit
console.log(data.rank.image)
//=> https://i.imgur.com/0qfIM1Z.png
}).catch(error => { console.log(error)});
// Catch errors

Top

// Initialize
const tankionline = require("tankionline.js");

const Top = new tankionline.top("crystals");

Top.then(data => {
console.log(data.top[0].value)
//=> 51120
}).catch(error => { console.log(error)});
// Catch errors

More info in the Wiki

2.0.4

4 years ago

2.0.3

4 years ago

2.0.2

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.0.0

5 years ago