Skip to main content

Class: PlayerManager

Constructors

constructor

new PlayerManager(token)

Parameters

NameType
tokenstring

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

NameTypeDescription
tagstringThe 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

NameTypeDescription
...tagsstring[]The tag of each player.

Returns

Promise<Player[]>

Defined in

lib/managers/PlayerManager.ts:37