3.2.0 • Published 2 years ago

brawlstats v3.2.0

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
2 years ago

brawlstats

An advanced tags system for slash commands

GitHub npm

Description

An advanced API wrapper for the Brawl Stars API.

Features

  • Written in Typescript.
  • Supports both ES modules and CommonJS.

Installation

yarn add brawlstats
# or npm install brawlstats
# or pnpm add brawlstats

Usage

With ESM

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();

With CJS

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();
})();

Miscallaneous

3.2.0

2 years ago

3.1.2

2 years ago

3.1.1

2 years ago

3.0.1

2 years ago

3.0.0

2 years ago

2.1.1

2 years ago

2.1.0

2 years ago

2.0.0

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago