1.0.2 • Published 2 years ago

brawlstars-api.js v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

BrawlStars-API.js

Version Issues

Brawlstars-api.js is a library made to interact with the Official Brawl Stars api, listing all of their endpoints in one place.

✨ How to install:

npm install brawlstars-api.js

🧩 How to use:

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!

📚 Documentation:

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.

🔧 Extras

  • 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!