Player

Player

new Player()

An API returned player object
Source:

Members

attributes :Object

Attributes of the Player
Properties:
Name Type Description
attributes.name string PUBG player name
attributes.shardId string Platform-region shard
attributes.patchVersion string Version of the game
attributes.titleId string Identifies the studio and game
Source:
Type:
  • Object

full :boolean

If the player contains full data or needs `.fetch()`
Source:
Type:
  • boolean

id :string

API id of the player
Source:
Type:
  • string

relationships :Object

References to resource objects related to this player
Properties:
Name Type Description
relationships.assets Array.<Asset> NOT IN API YET: Array of all assets of the player
relationships.matches Array.<Match> Array of empty Match classes, will need `.fetch()`
Source:
Type:
  • Object

Methods

fetch(shardopt) → {Promise.<Match>}

Fetches the full match
Source:
Parameters:
Name Type Attributes Default Description
shard string <optional>
this.client.defaultShard ShardId to fetch the player from
Returns:
Type:
Promise.<Match>

getPlayerSeason(season, shardopt) → {Promise.<PlayerSeason>}

Get a player season object
Source:
Parameters:
Name Type Attributes Default Description
season string | Season The season of the player season
shard string <optional>
this.attributes.shardId The shard of the player season
Returns:
Type:
Promise.<PlayerSeason>