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:

ParameterTypeDescription
clientClientThe 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:

ParameterTypeDescription
idStringThe summoner ID to fetch the live game for.
optionsFetchOptionsThe basic fetching options.

Return type: Promise < CurrentGame >


.fetchFeatured ()

Fetch a list of featured games.

Signature:

fetchFeatured(options?: FetchOptions): Promise<CurrentGame[]>;

Parameters:

ParameterTypeDescription
optionsFetchOptionsThe basic fetching options (does not fetch from storage or cache).

Return type: Promise < CurrentGame >