Table of Contents
- Installation
- Getting Started
-
Reference
brawlstars.brawlers.get
brawlstars.brawlers.list
brawlstars.clubs.getInformation
brawlstars.clubs.listMembers
brawlstars.events.getRotation
brawlstars.players.getBattleLog
brawlstars.players.getInformation
brawlstars.rankings.getBrawlerRankings
brawlstars.rankings.getClubRankings
brawlstars.rankings.getPlayerRankings
brawlstars.rankings.getPowerPlaySeasonRankings
brawlstars.rankings.getPowerPlaySeasons
Installation
npm |
pnpm |
yarn |
---|---|---|
npm i brawlstars-typescript-sdk |
pnpm i brawlstars-typescript-sdk |
yarn add brawlstars-typescript-sdk |
Getting Started
import { Brawlstars } from "brawlstars-typescript-sdk";
const brawlstars = new Brawlstars({
// Defining the base path is optional and defaults to https://api.brawlstars.com/v1
// basePath: "https://api.brawlstars.com/v1",
apiKey: "API_KEY",
});
const getResponse = await brawlstars.brawlers.get({
brawlerId: "brawlerId_example",
});
console.log(getResponse);
Reference
brawlstars.brawlers.get
Get information about a brawler.
🛠️ Usage
const getResponse = await brawlstars.brawlers.get({
brawlerId: "brawlerId_example",
});
⚙️ Parameters
string
brawlerId: Identifier of the brawler.
🔄 Return
🌐 Endpoint
/brawlers/{brawlerId}
GET
brawlstars.brawlers.list
Get list of available brawlers.
🛠️ Usage
const listResponse = await brawlstars.brawlers.list({});
⚙️ Parameters
string
before: Return only items that occur before this marker. Before marker can be found from the response, inside the 'paging' property. Note that only after or before can be specified for a request, not both.
string
after: Return only items that occur after this marker. Before marker can be found from the response, inside the 'paging' property. Note that only after or before can be specified for a request, not both.
number
limit: Limit the number of items returned in the response.
🔄 Return
🌐 Endpoint
/brawlers
GET
brawlstars.clubs.getInformation
Get information about a single clan by club tag. Club tags can be found in game. Note that clan tags start with hash character '#' and that needs to be URL-encoded properly to work in URL, so for example clan tag '#2ABC' would become '%232ABC' in the URL.
🛠️ Usage
const getInformationResponse = await brawlstars.clubs.getInformation({
clubTag: "clubTag_example",
});
⚙️ Parameters
string
clubTag: Tag of the club.
🔄 Return
🌐 Endpoint
/clubs/{clubTag}
GET
brawlstars.clubs.listMembers
List club members.
🛠️ Usage
const listMembersResponse = await brawlstars.clubs.listMembers({
clubTag: "clubTag_example",
});
⚙️ Parameters
string
clubTag: Tag of the club.
string
before: Return only items that occur before this marker. Before marker can be found from the response, inside the 'paging' property. Note that only after or before can be specified for a request, not both.
string
after: Return only items that occur after this marker. Before marker can be found from the response, inside the 'paging' property. Note that only after or before can be specified for a request, not both.
number
limit: Limit the number of items returned in the response.
🔄 Return
🌐 Endpoint
/clubs/{clubTag}/members
GET
brawlstars.events.getRotation
Get event rotation for ongoing events.
🛠️ Usage
const getRotationResponse = await brawlstars.events.getRotation();
🔄 Return
🌐 Endpoint
/events/rotation
GET
brawlstars.players.getBattleLog
Get list of recent battle results for a player. NOTE: It may take up to 30 minutes for a new battle to appear in the battlelog.
🛠️ Usage
const getBattleLogResponse = await brawlstars.players.getBattleLog({
playerTag: "playerTag_example",
});
⚙️ Parameters
string
playerTag: Tag of the player.
🔄 Return
🌐 Endpoint
/players/{playerTag}/battlelog
GET
brawlstars.players.getInformation
Get information about a single player by player tag. Player tags can be found either in game or by from clan member list.
🛠️ Usage
const getInformationResponse = await brawlstars.players.getInformation({
playerTag: "playerTag_example",
});
⚙️ Parameters
string
playerTag: Tag of the player.
🔄 Return
🌐 Endpoint
/players/{playerTag}
GET
brawlstars.rankings.getBrawlerRankings
Get brawler rankings for a country or global rankings. Brawler identifiers can be found by using the /v1/brawlers API endpoint.
🛠️ Usage
const getBrawlerRankingsResponse = await brawlstars.rankings.getBrawlerRankings(
{
countryCode: "countryCode_example",
brawlerId: "brawlerId_example",
}
);
⚙️ Parameters
string
countryCode: Two letter country code, or 'global' for global rankings.
string
brawlerId: Identifier of the brawler.
string
before: Return only items that occur before this marker. Before marker can be found from the response, inside the 'paging' property. Note that only after or before can be specified for a request, not both.
string
after: Return only items that occur after this marker. Before marker can be found from the response, inside the 'paging' property. Note that only after or before can be specified for a request, not both.
number
limit: Limit the number of items returned in the response.
🔄 Return
🌐 Endpoint
/rankings/{countryCode}/brawlers/{brawlerId}
GET
brawlstars.rankings.getClubRankings
Get club rankings for a country or global rankings.
🛠️ Usage
const getClubRankingsResponse = await brawlstars.rankings.getClubRankings({
countryCode: "countryCode_example",
});
⚙️ Parameters
string
countryCode: Two letter country code, or 'global' for global rankings.
string
before: Return only items that occur before this marker. Before marker can be found from the response, inside the 'paging' property. Note that only after or before can be specified for a request, not both.
string
after: Return only items that occur after this marker. Before marker can be found from the response, inside the 'paging' property. Note that only after or before can be specified for a request, not both.
number
limit: Limit the number of items returned in the response.
🔄 Return
🌐 Endpoint
/rankings/{countryCode}/clubs
GET
brawlstars.rankings.getPlayerRankings
Get player rankings for a country or global rankings.
🛠️ Usage
const getPlayerRankingsResponse = await brawlstars.rankings.getPlayerRankings({
countryCode: "countryCode_example",
});
⚙️ Parameters
string
countryCode: Two letter country code, or 'global' for global rankings.
string
before: Return only items that occur before this marker. Before marker can be found from the response, inside the 'paging' property. Note that only after or before can be specified for a request, not both.
string
after: Return only items that occur after this marker. Before marker can be found from the response, inside the 'paging' property. Note that only after or before can be specified for a request, not both.
number
limit: Limit the number of items returned in the response.
🔄 Return
🌐 Endpoint
/rankings/{countryCode}/players
GET
brawlstars.rankings.getPowerPlaySeasonRankings
Get power play rankings for a country or global rankings. Season identifiers can be found by using the /rankings/{countryCode}/powerplay/seasons API endpoint. Also, 'latest' can be used as seasonId to get rankings for the latest season.
🛠️ Usage
const getPowerPlaySeasonRankingsResponse =
await brawlstars.rankings.getPowerPlaySeasonRankings({
countryCode: "countryCode_example",
seasonId: "seasonId_example",
});
⚙️ Parameters
string
countryCode: Two letter country code, or 'global' for global rankings.
string
seasonId: Identifier of the season.
string
before: Return only items that occur before this marker. Before marker can be found from the response, inside the 'paging' property. Note that only after or before can be specified for a request, not both.
string
after: Return only items that occur after this marker. Before marker can be found from the response, inside the 'paging' property. Note that only after or before can be specified for a request, not both.
number
limit: Limit the number of items returned in the response.
🔄 Return
🌐 Endpoint
/rankings/{countryCode}/powerplay/seasons/{seasonId}
GET
brawlstars.rankings.getPowerPlaySeasons
Get list of power play seasons for a country or global rankings.
🛠️ Usage
const getPowerPlaySeasonsResponse =
await brawlstars.rankings.getPowerPlaySeasons({
countryCode: "countryCode_example",
});
⚙️ Parameters
string
countryCode: Two letter country code, or 'global' for global rankings.
string
before: Return only items that occur before this marker. Before marker can be found from the response, inside the 'paging' property. Note that only after or before can be specified for a request, not both.
string
after: Return only items that occur after this marker. Before marker can be found from the response, inside the 'paging' property. Note that only after or before can be specified for a request, not both.
number
limit: Limit the number of items returned in the response.
🔄 Return
🌐 Endpoint
/rankings/{countryCode}/powerplay/seasons
GET
Author
This TypeScript package is automatically generated by Konfig