Class: Player

Scoreflex.SDK. Player

new Player(playerId, data)

Player instance object.

Parameters:
Name Type Description
playerId string

player ID

data object

player raw data

Source:

Methods

getAvatarUrl() → {string}

Return the avatar url of the player

Source:
Returns:

url

Type
string

getData() → {object}

Return the player raw data.

Source:
Returns:
Type
object

getGeo(key) → {Object|string}

Return the location Object for the player, or a field value

Parameters:
Name Type Argument Description
key string <optional>

facultative field key (id, adminLevel, countryCode, formatted or title)

Source:
Returns:
Type
Object | string

getId() → {string}

Return the player's identifier (playerId).

Source:
Returns:

Player ID

Type
string

getNickname() → {string}

Return the player's nickname.

Source:
Returns:

nickname

Type
string

getValue() → {mixed}

Get a player's data key

Source:
Returns:
Type
mixed

setData()

Set the player raw data.

Source:

showFriends(parameters, options)

Display a web client with the list of friends of the player.

Parameters:
Name Type Description
parameters object

key/value pair of query string parameters

options object

key/value pair of WebClient options

Source:

showProfile(parameters, options)

Display a web client with the profile of the player.

Parameters:
Name Type Description
parameters object

key/value pair of query string parameters

options object

key/value pair of WebClient options

Source: