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:
Parameter | Type | Description |
---|---|---|
client | Client | The 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:
Parameter | Type | Description |
---|---|---|
key | String | The ID of the spell to fetch. |
options | FetchOptions | The basic fetching options. |
Return type: Promise < SummonerSpell >
.fetchAll ()
Fetch all summoner spells.
Signature:
fetchAll(options?: FetchOptions): Promise<Collection<string, SummonerSpell>>;
Parameters:
Parameter | Type | Description |
---|---|---|
options | FetchOptions | The 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:
Parameter | Type | Description |
---|---|---|
name | String | The name of the spell to look for. |
options | FetchOptions | The basic fetching options. |
Return type: Promise < SummonerSpell | Undefined >