Object to get and manipulate players.
Methods
-
<static> get(playerId, parameters, handlers, noCache)
-
Request a player and call the onload handler with a module:Scoreflex.SDK.Player instance.
Parameters:
Name Type Description playerId
string Player ID
parameters
object key/value pair of query string parameters
handlers
module:Scoreflex.SDK.Handlers request callbacks
noCache
boolean if true, bypass the local cache
-
<static> getCurrent() → {module:Scoreflex.SDK.Player}
-
Return the current player as a Player object.
Returns:
Player instance
-
<static> showFriends(playerId, parameters, options)
-
Display a web client with the list of friends of a player (default, current player).
Parameters:
Name Type Description playerId
string default 'me'
parameters
object key/value pair of query string parameters
options
object key/value pair of WebClient options
-
<static> showProfile(playerId, parameters, options)
-
Display a web client with the profile of a player (default, current player).
Parameters:
Name Type Description playerId
string default 'me'
parameters
object key/value pair of query string parameters
options
object key/value pair of WebClient options