2.1.1 • Published 1 year ago

brawlstars v2.1.1

Weekly downloads
120
License
MIT
Repository
github
Last release
1 year ago

Brawl Stars

GitHub repo size GitHub Discord

Unofficial API wrapper for the Official Brawl Stars API.

This package implements all the API and is written in TypeScript for safety and full typings support.

Install

$ npm install brawlstars

TypeScript typings included in the installation.

Usage

Simply import the Client class and instantiate it with your API token:

// TypeScript, ESM
import { Client } from "brawlstars";

// CommonJS, Node.js
const { Client } = require("brawlstars");

// Create instance
const client = new Client("TOKEN", { 
  cache: true, // default is true
  cacheOptions: undefined /* options for node-cache, default is undefined. */
});

// Call into functions
client.getPlayer("TAG")
  .then(player => console.log(player.name))
  .catch(err => console.error(err));

All functions return a Promise. Tags are cleaned before use (Removes # and replaces letter O with zero 0)

All results are cached when supercell sends cache-control in the response, in that case the objects are in cache until the max-age expires. Caching can be disabled and options can be passed to the underlying node-cache library.

License

BrawlStars Wrapper is released under the MIT License

This is an unofficial wrapper. We are not affiliated, associated, authorized, endorsed by, or in any way officially connected with Supercell, or any of its subsidiaries or its affiliates.

2.1.1

1 year ago

2.1.0

1 year ago

2.0.1

4 years ago

2.0.0

4 years ago

1.2.4

5 years ago

1.2.3

5 years ago

1.2.2

5 years ago

1.2.1

5 years ago

1.2.0

5 years ago

1.1.6

5 years ago

1.1.5

5 years ago

1.1.4

5 years ago

1.1.3

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.0

5 years ago