Class: PlayerManager
Constructors
constructor
• new PlayerManager(token
)
Parameters
Name | Type |
---|---|
token | string |
Defined in
lib/managers/PlayerManager.ts:11
Properties
#token
• Private
#token: string
Defined in
lib/managers/PlayerManager.ts:9
cache
• Private
Readonly
cache: Cache
<Player
>
Defined in
lib/managers/PlayerManager.ts:10
Methods
fetch
▸ fetch(tag
): undefined
| Player
| Promise
<Player
>
Get details of a player from the API.
Parameters
Name | Type | Description |
---|---|---|
tag | string | The tag of the player. |
Returns
undefined
| Player
| Promise
<Player
>
Defined in
lib/managers/PlayerManager.ts:19
fetchMany
▸ fetchMany(...tags
): Promise
<Player
[]>
Get details of multiple players from the API.
Parameters
Name | Type | Description |
---|---|---|
...tags | string [] | The tag of each player. |
Returns
Promise
<Player
[]>