Skip to content

Latest commit

 

History

History
77 lines (51 loc) · 6.96 KB

documentation.md

File metadata and controls

77 lines (51 loc) · 6.96 KB
Brawl Stars

A light-weight module that makes Brawl Stars API become easy.

Coverage Status

Install size Current version

Introduction

Provides an easy way to get started with the Brawl Stars API For more information about the responses please check Official Brawl Stars Dev Website. Not releated to Supercell. Created By: Philippe Smeets

Installation

npm install brawl-stars-node

Usage

All fetches return a promise using request-promise

Instantiation

In order to get started with Brawl Stars API, you need to create an account at developer.brawlstars.com. Then go "My Account" and press on "Create New Key". Fill in the name, description and IP address and copy the key. This is the key that we are later going to use to authenticate you.

Once you get your token and have installed the module. Require the package into you file using require() and call the login function.

Example:

const client = require('brawl-stars-node');
await client.login('YOUR-TOKEN-HERE');

Remember that the client.login() is an asynchronised function.

Documentation

Authentication

Login

Function Parameter Description
#login auth Logs the user in
await client.login('YOUR-TOKEN-HERE');

INPUT

Name Type Required Description
auth string True The Authentication Token granted by developer.clashofclans.com
clubTag string True The tag of the club.
playerTag string True The tag of a player. Found in player's profile.
seasonId string True The id of that season. client.getRankingsPowerplaySeasons() will show all possible id's.

OUTPUT

Name Type Optional Description

MORE OUTPUT DATA

For more output data please check the Official Brawl Stars Dev Website.

Disclaimer

This content is not affiliated with, endorsed, sponsored, or specifically approved by Supercell and Supercell is not responsible for it. For more information see Supercell's Fan Content Policy: <www.supercell.com/en/fan-content-policy/>