# queryLeagueData
Returns data for the specified season, queue, team, and league.
const { StarCraft2API } = require('starcraft2-api');
const sc2api = new StarCraft2API({
region: 'us',
clientId: 'client id',
clientSecret: 'client secret'
});
const data = await sc2api.queryLeagueData({
seasonId: 37,
queueId: 201,
teamType: 0,
leagueId: 6,
});
console.log(data);
// Do something with data
# Parameter object properties
- seasonId (string / number) - the season ID of the data to retrieve,
- queueId (string / number) - the queue ID of the data to retrieve. The following queue IDs are mentioned in Blizzard Battle.net docs (opens new window):
1
- Wings of Liberty 1v12
- Wings of Liberty 2v23
- Wings of Liberty 3v34
- Wings of Liberty 4v4101
- Heart of the Swarm 1v1102
- Heart of the Swarm 2v2103
- Heart of the Swarm 3v3104
- Heart of the Swarm 4v4201
- Legacy of the Void 1v1202
- Legacy of the Void 2v2203
- Legacy of the Void 3v3204
- Legacy of the Void 4v4206
- Legacy of the Void Archon
- teamType (string / number) - The team type of the data to retrieve. The following teamtypes are mentioned in Blizzard Battle.net docs (opens new window):
0
- arranged1
- random
- leagueId - The league ID (rank name) of the data to retrieve. The following league IDs are mentioned in Blizzard Battle.net docs (opens new window):
0
- Bronze1
- Silver2
- Gold3
- Platinum4
- Diamond5
- Master6
- Grandmaster
- options (object, optional) - query options (opens new window)