TokenRankedApi
api.krunker.io behind a token: the ranked system's own api, plain {data} without an error field on success
Constructors
Constructor
new TokenRankedApi(api, auth): TokenRankedApi;Parameters
| Parameter | Type |
|---|---|
api | KrunkerClient |
auth | Record<string, string> |
Returns
TokenRankedApi
Methods
connection()
connection(): Promise<RankedConnection>;GET /ranked/me/connection, the ranked lobby the player is bound to, serverUrl null without one
Returns
Promise<RankedConnection>
dailySpin()
dailySpin(): Promise<DailySpinProgress>;GET /daily-spin/progress, the daily spin meter
Returns
Promise<DailySpinProgress>
leaderboard()
leaderboard(season, query?): Promise<SeasonRankings>;GET /leaderboards/rankings/season/:season[/region/:region], 40 per page in the game; a token is required although the board is public
Parameters
| Parameter | Type |
|---|---|
season | number |
query? | SeasonRankingsQuery |
Returns
Promise<SeasonRankings>
matchHistory()
matchHistory(season, query?): Promise<RankedMatchHistory>;GET /match-history/me/season/:season/gameMode/:mode/isRanked/:ranked[/region/:region]; the game sends the literal "undefined" as mode for all modes, which the api accepts
Parameters
| Parameter | Type |
|---|---|
season | number |
query? | RankedMatchHistoryQuery |
Returns
Promise<RankedMatchHistory>
profile()
profile(season, region?): Promise<RankedProfile>;GET /player-profile/me/season/:season[/region/:region], the player's ranked card with season totals (accuracy included)
Parameters
| Parameter | Type |
|---|---|
season | number |
region? | number |
Returns
Promise<RankedProfile>