ChallengeManager class
A challenge manager - to fetch and manage all the challenges' data. Requires API key with access to lol-challenges-v1
API.
Signature:
export declare class ChallengeManager implements BaseManager<Challenge>
Implements: BaseManager<Challenge>
References: BaseManager, Challenge
Constructor
new ChallengeManager (client: Client)
Constructs a new instance of the ChallengeManager
class.
Parameters:
Parameter | Type | Description |
---|---|---|
client | Client | The client this challenge manager belongs to. |
Properties
client
The client this challenge manager belongs to.
Type: Client
Methods
.fetch ()
Fetch a challenge by the challenge ID.
Signature:
fetch(id: number, options?: FetchOptions): Promise<Challenge>;
Parameters:
Parameter | Type | Description |
---|---|---|
id | Number | The ID of the challenge you want to find. |
options | FetchOptions | The basic fetching options. |
Return type: Promise < Challenge >
.fetchAll ()
Fetch all challenges.
Signature:
fetchAll(options?: FetchOptions): Promise<Collection<number, Challenge>>;
Parameters:
Parameter | Type | Description |
---|---|---|
options | FetchOptions | The basic fetching options (force is ignored here). |
Return type: Promise < Collection < Number, Challenge > >
.fetchLeaderboard ()
Fetch the leader board of a challenge.
Signature:
fetchLeaderboard(id: number, level: 'MASTER' | 'GRANDMASTER' | 'CHALLENGER', options?: FetchOptions & { limit: number; }): Promise<ChallengeRank[]>;
Parameters:
Parameter | Type | Description |
---|---|---|
id | Number | The ID of the challenge whose leaderboard you want to find. |
level | 'MASTER' | 'GRANDMASTER' | 'CHALLENGER' | The tier of the leaderboard. |
options | FetchOptions & { limit: number; } | The basic fetching options, with an additional limit option. Limit (or count) is 200 by default. |
Return type: Promise < ChallengeRank >
.fetchSummonerProgression ()
Fetch the progress of a summoner in the challenges.
Signature:
fetchSummonerProgression(playerId: string, options?: FetchOptions): Promise<SummonerChallenge>;
Parameters:
Parameter | Type | Description |
---|---|---|
playerId | String | The player ID (puuid) of the summoner whose progress you want to find. |
options | FetchOptions | The basic fetching options. |
Return type: Promise < SummonerChallenge >
Table of Contents