LeagueManager class
A league manager - to fetch and manage all summoner competitive info. Requires API key with access to league-v4
and league-exp-v4
API.
Signature:
export declare class LeagueManager implements BaseManager<Collection<QueueType, LeagueEntry>>
Implements: BaseManager<Collection<QueueType, LeagueEntry>>
References: BaseManager, Collection, QueueType, LeagueEntry
Constructor
new LeagueManager (client: Client)
Constructs a new instance of the LeagueManager
class.
Parameters:
Parameter | Type | Description |
---|---|---|
client | Client | The client this league manager belongs to. |
Properties
client
The client this league manager belongs to.
Type: Client
Methods
.fetch ()
Fetch a summoner's competitive info by the summoner's ID.
Signature:
fetch(id: string, options?: FetchOptions): Promise<Collection<QueueType, LeagueEntry>>;
Parameters:
Parameter | Type | Description |
---|---|---|
id | String | The ID of the summoner whose competitive info you want to find. |
options | FetchOptions | The basic fetching options. |
Return type: Promise < Collection < QueueType, LeagueEntry > >
.fetchByLeagueId ()
Fetch the league entries by a league ID.
Signature:
fetchByLeagueId(leagueId: string, options?: FetchOptions): Promise<LeagueList>;
Parameters:
Parameter | Type | Description |
---|---|---|
leagueId | String | The League ID. |
options | FetchOptions | The basic fetching options (exception: force defaults to true). |
Return type: Promise < LeagueList >
.fetchByQueueAndTier ()
Fetch a collection of league entries by the queue type, tier and division.
Signature:
fetchByQueueAndTier(queue: QueueType, tier: TierType, division: DivisionType, options?: FetchOptions & { page: number; }): Promise<Collection<string, LeagueEntry>>;
Parameters:
Parameter | Type | Description |
---|---|---|
queue | QueueType | The type of queue - RANKED_SOLO_5x5, RANKED_FLEX_SR, etc. |
tier | TierType | The tier of the entries - IRON to CHALLENGER. |
division | DivisionType | The division of the entries - I, II, III, IV. |
options | FetchOptions & { page: number; } | The basic fetching options (and page number - defaults to 1). |
Return type: Promise < Collection < String, LeagueEntry > >