This repo has been moved to Monorepo
An advanced API wrapper for the Brawl Stars API.
- Written in Typescript.
- Supports both ES modules and CommonJS.
yarn add brawlstats
# or npm install brawlstats
# or pnpm add brawlstats
import { Client, LogLevel } from 'brawlstats';
const client = new Client({
/**
* Your Brawl Stars API key.
* @defaults to the environment variable `BRAWLSTATS_TOKEN`
*/
token: 'your-api-key'
})
// get a player
const player = await client.getPlayer('#22QJ0JPVJ');
// or a club
const club = await client.getClub('#XYZ');
// or events rotation
const events = await client.getRotation();
// or all brawlers available in the game
const brawlers = await client.getBrawlers();
const { Client, LogLevel } = require('brawlstats');
const client = new Client({
/**
* Your Brawl Stars API key.
* @defaults to the environment variable `BRAWLSTATS_TOKEN`
*/
token: 'your-api-key'
})
(async () => {
// get a player
const player = await client.getPlayer('#22QJ0JPVJ');
// or a club
const club = await client.getClub('#XYZ');
// or events rotation
const events = await client.getRotation();
// or all brawlers available in the game
const brawlers = await client.getBrawlers();
})();
- Like the wrapper? then please star us at GitHub
- If you have any questions, feel free to open an issue
- If you have any feedback, feel free to open a discussion