CurrentGameManager class
A current game manager - to fetch and manage the live games. Requires API key with access to spectator-v4
API.
Signature:
export declare class CurrentGameManager implements BaseManager<CurrentGame>
Implements: BaseManager<CurrentGame>
References: BaseManager, CurrentGame
Constructor
new CurrentGameManager (client: Client)
Constructs a new instance of the CurrentGameManager
class.
Parameters:
Parameter | Type | Description |
---|---|---|
client | Client | The client this current game manager belongs to. |
Properties
client
The client this current game manager belongs to.
Type: Client
Methods
.fetch ()
Fetches the live game for the given summoner ID.
Signature:
fetch(id: string, options?: FetchOptions): Promise<CurrentGame>;
Parameters:
Parameter | Type | Description |
---|---|---|
id | String | The summoner ID to fetch the live game for. |
options | FetchOptions | The basic fetching options. |
Return type: Promise < CurrentGame >
.fetchFeatured ()
Fetch a list of featured games.
Signature:
fetchFeatured(options?: FetchOptions): Promise<CurrentGame[]>;
Parameters:
Parameter | Type | Description |
---|---|---|
options | FetchOptions | The basic fetching options (does not fetch from storage or cache). |
Return type: Promise < CurrentGame >
Table of Contents