0.0.4 • Published 3 years ago
@mattplays/bloonstd6-api v0.0.4
BloonsTD6-API
This package is a wrapper for the unofficial Bloons TD 6 API
Bloons TD 6
This is an Unoffical API [Unoffical API Docs](https://statsnite.com/btd/api)
Usage
const {BloonsTD6API} = require("@mattplays/bloonstd6-api");
const BloonsTD6API = new BloonsTD6API(); //No API Key Required
Functions
GetAllTowers
List all towers in BTD6
Output
The GetAllTowers function returns a Promise<Tower[]>
type
Usage
const BloonsTD6API = new BloonsTD6API();
BloonsTD6API.GetAllTowers().then((data) => {
// Your Code Here :D
});
GetTowerByID
Get a specific tower in BTD6.
Input
export type TowerID = "dart-monkey" | "boomerang-monkey" | "bomb-shooter" | "tack-shooter" | "ice-monkey" | "glue-gunner" | "sniper-monkey" | "monkey-sub" | "monkey-buccaneer" | "monkey-ace" | "heli-pilot" | "mortar-monkey" | "dartling-gunner" | "wizard-monkey" | "super-monkey" | "ninja-monkey" | "alchemist" | "druid" | "banana-farm" | "spike-factory" | "monkey-village" | "engineer-monkey";
Input | Type | Required | Description |
---|---|---|---|
towerID | TowerID | Yes | a Tower ID ie. 'dart-monkey', 'super-monkey' |
Output
The GetTowerByID function returns a Promise<Tower>
type
Usage
const BloonsTD6API = new BloonsTD6API();
BloonsTD6API.GetTowerByID("dart-monkey").then((data) => {
// Your Code Here :D
});
GetAllHeros
List all Heros in BTD6.
Output
The GetAllHeros function returns a Promise<Hero[]>
type
Usage
const BloonsTD6API = new BloonsTD6API();
BloonsTD6API.GetAllHeros().then((data) => {
// Your Code Here :D
});
GetHeroByID
Get a specific Hero in BTD6.
Input
export type HeroID = "quincy" | "gwendolin" | "striker-jones" | "captain-churchill" | "benjamin" | "ezili" | "pat-fusty" | "adora" | "admiral-brickell" | "etienne" | "sauda";
Input | Type | Required | Description |
---|---|---|---|
heroID | HeroID | Yes | a Hero ID ie. 'quincy' |
Output
The GetHeroByID function returns a Promise<Hero>
type
Usage
const BloonsTD6API = new BloonsTD6API();
BloonsTD6API.GetHeroByID("quincy").then((data) => {
// Your Code Here :D
});
GetAllBloons
List all bloons in BTD6
Output
The GetAllBloons function returns a Promise<Bloon[]>
type
Usage
const BloonsTD6API = new BloonsTD6API();
BloonsTD6API.GetAllBloons().then((data) => {
// Your Code Here :D
});
GetBloonByID
Get a specific Bloon in BTD6.
Input
export type BloonID = "red" | "blue" | "green" | "pink" | "black" | "white" | "purple" | "lead" | "zebra" | "rainbow" | "ceramic" | "golden" | "ghost" | "moab" | "bfb" | "zomg" | "bad" | "ddt"
Input | Type | Required | Description |
---|---|---|---|
bloonID | BloonID | Yes | a Bloon ID ie. 'red', 'blue' |
Output
The GetBloonByID function returns a Promise<Bloon>
type
Usage
const BloonsTD6API = new BloonsTD6API();
BloonsTD6API.GetBloonByID("red").then((data) => {
// Your Code Here :D
});