# tankionline.js

> An-easy-to use wrapper that fetches player ratings for Tanki Online

Latest version **2.0.4** (published 2020-10-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install tankionline.js
pnpm add tankionline.js
yarn add tankionline.js
bun add tankionline.js
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.4 |
| Published | 2020-10-05 |
| First published | 2019-03-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 20.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | GeopJr |
| Maintainers | geopjr |
| Keywords | tanki, tankionline, ratings |

## Links

- npm: https://www.npmjs.com/package/tankionline.js
- Repository: https://github.com/GeopJr/tankionline.js
- Homepage: https://github.com/GeopJr/tankionline.js#readme
- Issues: https://github.com/GeopJr/tankionline.js/issues
- npm.io page: https://npm.io/package/tankionline.js

## Dependencies (1)

- [node-fetch](https://npm.io/package/node-fetch.md) ^2.3.0

## Recent versions

- 2.0.4 (latest) — 2020-10-05
- 2.0.3 — 2020-05-22
- 2.0.2 — 2020-05-22
- 2.0.1 — 2020-04-20
- 2.0.0 — 2020-04-20
- 1.0.0 — 2019-03-02

## README

<div align="center">
<br />
  <p>
    <a href="https://github.com/GeopJr/tankionline.js/blob/master/LICENSE"><img src="https://img.shields.io/badge/LICENSE-MIT-000000.svg" alt="MIT" /></a>
    <a href="https://www.npmjs.com/package/tankionline.js"><img src="https://img.shields.io/npm/v/tankionline.js.svg?maxAge=3600"></a>
    <a href="https://www.npmjs.com/package/tankionline.js"><img src="https://img.shields.io/npm/dt/tankionline.js.svg?maxAge=3600"></a>
    <a href="https://www.npmjs.com/package/tankionline.js"><img src="https://github.com/GeopJr/tankionline.js/workflows/Build%20and%20Publish/badge.svg"></a>
  </p>
  <br />
  <p>
    <img src="https://i.imgur.com/qKADpoR.png" alt="tankionline.js"/>
  </p>
  <br />
  <p>
    <a href="https://www.npmjs.com/package/tankionline.js"><img src="https://nodei.co/npm/tankionline.js.png?compact=true"></a>
  </p>
  <br />
  <p>An API wrapper for Tanki Online ratings.</p>
</div>

# Install
```
$ npm i tankionline.js
```

# Examples
### Ratings
```js
// 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
```js
// 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
```js
// 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](https://github.com/GeopJr/tankionline.js/wiki)

<div align="center">
  <br />
  <p>
    <img src="https://i.imgur.com/HEtVbUc.png" alt="info"/>
  </p>
  </div>

---
_Source: https://npm.io/package/tankionline.js · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
