Brawlstars-api.js is a library made to interact with the Official Brawl Stars api, listing all of their endpoints in one place.
npm install brawlstars-api.js
First you need a token generated by the official Brawl Stars Api, which you can create here: BrawlStars Developer Page.
With your token in hands, you need to import the brawlstars-api.js
and initialize it by passing the token as a string.
const bsClient = require("brawlstars-api.js")
const client = new bsClient("token")
After creating your client with a token, you can already interact with the API!
Here are some of the basic functionalities, but they return a promise, so you need to resolve them before obtaining the result, this can be done with async/await or .then.
await client.getPlayer('#208UR80')
await client.getPlayerBattles('#208UR80')
await client.getClub('#2GJ9UV8PJ')
await client.getBrawlers('colt')
// View the documentation to read about all the functionalities
Click here to see the full documentation.
- This project is currently open source, feel free to help and contribute in the project repository at GitHub.
- Found a bug? Just create an Issue report documenting what happened.
- Liked the module? Thanks :), maybe leave a star on the repository!