Skip to content

GeopJr/tankionline.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation


MIT


tankionline.js



An API wrapper for Tanki Online ratings.

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


info

About

An API wrapper for Tanki Online ratings.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •