# bloons-js

> A wrapper to work with the [StatsNite Bloons TD 6 API](https://statsnite.com/btd/api)

Latest version **1.3.1** (published 2022-12-31) · MIT license · 0 weekly downloads

## Install

```sh
npm install bloons-js
pnpm add bloons-js
yarn add bloons-js
bun add bloons-js
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.3.1 |
| Published | 2022-12-31 |
| First published | 2022-12-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 10.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | João Érik da Silva Crisóstomo |
| Maintainers | gokeman |
| Keywords | wrapper, btd6, commonjs, module |

## Links

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

## Dependencies (1)

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

## Recent versions

- 1.3.1 (latest) — 2022-12-31
- 1.3.0 — 2022-12-31
- 1.2.0 — 2022-12-31
- 1.1.2 — 2022-12-31
- 1.1.1 — 2022-12-30
- 1.1.0 — 2022-12-30
- 1.0.0 — 2022-12-30

## README

# bloons-js
A wrapper to work with the [StatsNite Bloons TD 6 API](https://statsnite.com/btd/api)

# Install
`$ npm install bloons-js --save`

# Use
### Module
```js
import Bloonsjs from 'bloons-js';
```
### CommonJS
```js
const Bloonsjs = require('bloons-js');
```

# Examples
### Module
```js
import Bloonsjs from 'bloons-js';

async function getTowersId() {
    console.log(await BloonsJS.getAllTowers(true));
}
getTowersId();
```
### CommonJS
```js
const Bloonsjs = require('bloons-js');

async function getTowersId() {
    console.log(await BloonsJS.getAllTowers(true));
}
getTowersId();
```

# API

## getAllTowers(onlyId)
Returns information from all towers
### Params: 
* **onlyId**: boolean *optional* - displays only the id of the towers

## getTower(id)
Returns information from a specific tower
### Params: 
* **id**: string - tower id

## getAllHeroes(onlyId)
Returns information from all heroes
### Params: 
* **onlyId**: boolean *optional* - displays only the id of the heroes

## getHero(id)
Returns information from a specific hero
### Params: 
* **id**: string - hero id

## getAllBloons(onlyId)
Returns information from all bloons
### Params: 
* **onlyId**: boolean *optional* - displays only the id of the bloons

## getBloon(id)
Returns information from a specific bloon
### Params: 
* **id**: string - bloon id

## getTowerImage(towerId, level)
Returns tower image
### Params: 
* **towerId**: string - tower id
* **level**: string - tower level, for the default sprite use 'base', for path evolutions use '001', '002', '020', etc. for paragons forms use 'paragon'

## getHeroImage(heroId, level, skinId)
Returns hero image
### Params: 
* **heroId**: string - hero id
* **level**: string - hero level, use numbers from 1 to 20, but only those where there are changes in the sprite
* **skinId**: string - hero skin id

## getBloonImage(bloonId, type)
Returns bloon image
### Params: 
* **bloonId**: string - bloon id
* **type**: string - bloon type (camo, regrow, camoregrow, fort, fortcamo, fortcamoregrow, fortregrow)

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