Skip to main content
Version: 5.7.0

GetPlayerScores

Retrieves up to maxResults scores data for user for arcade-style leaderboard.

ServiceOperation
leaderboardGET_PLAYER_SCORES

Method Parameters

ParameterDescription
leaderboardIdThe leaderboard to retrieve the score from.
versionIdThe version of the leaderboard. Use -1 to specify the currently active leaderboard version.
maxResultsThe maximum number of player scores to retrieve.

Usage

http://localhost:3000
string leaderboardId = "anArcadeLeaderboardId";
int versionId = -1;
int maxResults = 10;
SuccessCallback successCallback = (response, cbObject) =>
{
Debug.Log(string.Format("Success | {0}", response));
};
FailureCallback failureCallback = (status, code, error, cbObject) =>
{
Debug.Log(string.Format("Failed | {0} {1} {2}", status, code, error));
};

_bc.LeaderboardService.GetPlayerScores(leaderboardId, versionId, maxResults, successCallback, failureCallback);
JSON Response
{
"data": {
"versionId": 1,
"scores": [
{
"score": 10101,
"data": {
"nickname": "batman"
},
"createdAt": 1613678944374,
"updatedAt": 1613678944374
},
{
"score": 101,
"data": {
"nickname": "batman"
},
"createdAt": 1613678939147,
"updatedAt": 1613678939147
},
{
"score": 10,
"data": {
"nickname": "batman"
},
"createdAt": 1613678933679,
"updatedAt": 1613678933679
}
],
"leaderboardId": "anArcadeLeaderboardId"
},
"status": 200
}