new Leaderboard(leaderboardId)
Leaderboard instance object.
Parameters:
Name | Type | Description |
---|---|---|
leaderboardId |
string | Leaderboard ID |
Methods
-
getId() → {string}
-
Return the leaderboard identifier (leaderboardId).
Returns:
Leaderboard ID
- Type
- string
-
show(parameters, options)
-
Display a web client for the requested leaderboard.
Parameters:
Name Type Description parameters
object key/value pair of query string parameters
options
object key/value pair of WebClient options
-
showOverview(parameters, options)
-
Display a web client for the requested leaderboard overview.
Parameters:
Name Type Description parameters
object key/value pair of query string parameters
options
object key/value pair of WebClient options
-
showRankbox(parameters, options)
-
Display a web client with the current player's score for the requested leaderboard.
Parameters:
Name Type Description parameters
object (facultative, the last score of the player} 'score':{int}
options
object key/value pair of WebClient options
-
submitScore(score, parameters, handlers)
-
Send a score to a leaderboard.
Parameters:
Name Type Description score
int raw score
parameters
object key/value pair of query string parameters
handlers
module:Scoreflex.SDK.Handlers request callbacks
-
submitScoreAndShowRankbox(score, parameters, options)
-
Put a score and show the rankbox. The rankbox takes into account the score.
Parameters:
Name Type Description score
int raw score
parameters
object key/value pair of query string parameters
options
object key/value pair of WebClient options