Skip to main content

Class: Player

The entity which we use to construct every player entry.

Hierarchy

  • Structure

    Player

Constructors

constructor

new Player(options)

Parameters

NameType
optionsOmit<IPlayer, "3vs3Victories">

Overrides

Structure.constructor

Defined in

lib/structures/Player.ts:26

Properties

#endpoint

Private #endpoint: string

Inherited from

Structure.#endpoint

Defined in

lib/structures/Structure.ts:5


#url

Private #url: string = 'https://bsproxy.royaleapi.dev/v1'

Inherited from

Structure.#url

Defined in

lib/structures/Structure.ts:4


bestRoboRumbleTime

bestRoboRumbleTime: number

Defined in

lib/structures/Player.ts:22


bestTimeAsBigBrawler

bestTimeAsBigBrawler: number

Defined in

lib/structures/Player.ts:23


brawlers

Optional brawlers: null | BrawlersEntity[]

Defined in

lib/structures/Player.ts:25


club

club: PlayerClub

Defined in

lib/structures/Player.ts:24


duoVictories

duoVictories: number

Defined in

lib/structures/Player.ts:21


expLevel

expLevel: number

Defined in

lib/structures/Player.ts:16


expPoints

expPoints: number

Defined in

lib/structures/Player.ts:17


highestPowerPlayPoints

highestPowerPlayPoints: number

Defined in

lib/structures/Player.ts:15


highestTrophies

highestTrophies: number

Defined in

lib/structures/Player.ts:14


icon

icon: Icon

Defined in

lib/structures/Player.ts:12


isQualifiedFromChampionshipChallenge

isQualifiedFromChampionshipChallenge: boolean

Defined in

lib/structures/Player.ts:18


name

name: string

Defined in

lib/structures/Player.ts:10


nameColor

nameColor: string

Defined in

lib/structures/Player.ts:11


soloVictories

soloVictories: number

Defined in

lib/structures/Player.ts:20


tag

tag: string

Defined in

lib/structures/Player.ts:9


trioVictories

trioVictories: number

Defined in

lib/structures/Player.ts:19


trophies

trophies: number

Defined in

lib/structures/Player.ts:13

Methods

getBattleLog

getBattleLog(): Promise<undefined | null | ItemsEntity[]>

Get battlelog of the player.

Returns

Promise<undefined | null | ItemsEntity[]>

Defined in

lib/structures/Player.ts:34


request

request<T>(endpoint?, token?): Promise<T>

Type parameters

Name
T

Parameters

NameType
endpointstring
tokenstring

Returns

Promise<T>

Inherited from

Structure.request

Defined in

lib/structures/Structure.ts:10