SummonerSpellManager class


A spell manager - to fetch and manage all summoner spell data.

Signature:

export declare class SummonerSpellManager implements BaseManager<SummonerSpell> 

Implements: BaseManager<SummonerSpell>

References: BaseManager, SummonerSpell


Constructor

new SummonerSpellManager (client: Client)

Constructs a new instance of the SummonerSpellManager class.

Parameters:

ParameterTypeDescription
clientClientThe client this summoner spell manager belongs to.

Properties

client

The client this summoner spell manager belongs to.

Type: Client


Methods

.fetch ()

Fetch a spell by its ID. The ID is usually something like Summoner{Spell} For example, for the spell Flash, the ID is SummonerFlash. But there are a lot of exceptions to this, so it is recommended to use fetchByName instead.

Signature:

fetch(key: string, options?: FetchOptions): Promise<SummonerSpell>;

Parameters:

ParameterTypeDescription
keyStringThe ID of the spell to fetch.
optionsFetchOptionsThe basic fetching options.

Return type: Promise < SummonerSpell >


.fetchAll ()

Fetch all summoner spells.

Signature:

fetchAll(options?: FetchOptions): Promise<Collection<string, SummonerSpell>>;

Parameters:

ParameterTypeDescription
optionsFetchOptionsThe basic fetching options.

Return type: Promise < Collection < String, SummonerSpell > >


.fetchByName ()

Fetch a spell by its name. The search is case-insensitive. The special characters are NOT ignored.

Signature:

fetchByName(name: string, options?: FetchOptions): Promise<SummonerSpell | undefined>;

Parameters:

ParameterTypeDescription
nameStringThe name of the spell to look for.
optionsFetchOptionsThe basic fetching options.

Return type: Promise < SummonerSpell | Undefined >