Skip to main content
Version: 5.7.0

PostTournamentScoreUTC

Post the users score to the tournament leaderboard.

tRank will always be zero in the response of this API call. The value generates after the tournament is complete or on ViewCurrentReward.

ServiceOperation
tournamentPOST_TOURNAMENT_SCORE

Method Parameters

ParameterDescription
leaderboardIdThe leaderboard for the tournament
scoreThe score to post
jsonDataOptional data attached to the leaderboard entry
roundStartedTimeTime the user started the match resulting in the score being posted. (date in millis UTC)

Usage

http://localhost:3000
string leaderboardId = "leaderboardId1";
int score = 0;
string jsonData = "{\"nickname\":\"batman\"}";
DateTime roundStartedTime = DateTime.Now;
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.TournamentService.PostTournamentScoreUTC(leaderboardId, score, jsonData, roundStartedTime, successCallback, failureCallback);
JSON Response
{
"status": 200,
"data": {
"leaderboardId": <%= data.example.leaderboardId %>,
"versionId": <%= data.example.returnedVersionId %>,
"playerId": <%= data.example.playerId %>,
"score": <%= data.example.score %>,
"data": <%= data.example.leaderboardExtraData_js %>,
"createdAt": <%= data.example.createdAt %>,
"updatedAt": <%= data.example.updatedAt %>,
"tCode": <%= data.example.tournamentCode %>,
"tRank": 0,
"tClaimedAt": 0
}
}