Skip to main content
Version: 6.0.0

PostGroupTournamentScoreWithResults

Posts the given score for member's group to the group leaderboard and returns leaderboard results. Group's score is updated, if applicable, based on leaderboard type (best score, latest score, cumulative score).

ServiceOperation
tournamentPOST_GROUP_TOURNAMENT_SCORE_WITH_RESULTS

Method Parameters

ParameterDescription
leaderboardIdThe leaderboard for the tournament.
groupIdMember's group id.
scoreThe score to post for group.
dataOptional data attached to the group leaderboard entry, if updated.
roundStartedEpochUTC timestamp the member started the match resulting in the score being posted. (date in millis.)
sortSort key for sort order of page. ("HIGH_TO_LOW" or "LOW_TO_HIGH")
beforeCountThe count of groups to include before the current group.
afterCountThe count of groups to include after the current group.
initialScoreThe initial score for group on first joining a tournament, applicable to this call if auto-join supported. Usually 0, unless leaderboard is LOW_VALUE.

Usage

http://localhost:3000
string leaderboardId = "the-leaderboard-id";
string groupId = "the-group-id";
int score = 0;
string data = "{\"memberNickname\": \"batman\"}";
int roundStartedEpoch = [[#ts]];
string sort = "HIGH_TO_LOW";
int beforeCount = 3;
int afterCount = 4;
int initialScore = 0;
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.PostGroupTournamentScoreWithResults(leaderboardId, groupId, score, data, roundStartedEpoch, sort, beforeCount, afterCount, initialScore, successCallback, failureCallback);
JSON Response
{
"data": {
"postScore": {
"leaderboardId": "lbg",
"versionId": 513,
"groupId": "55e701b7-6230-4536-9dfb-47f74524a09e",
"score": 30,
"data": {
"memberNickname": "batman"
},
"createdAt": 1772654392327,
"updatedAt": 1772654840839,
"tCode": "myGroupTournamentCode",
"isInitialTScore": false,
"tRank": 0,
"previousScore": 20,
"rank": 1
},
"scores": [
{
"groupId": "55e701b7-6230-4536-9dfb-47f74524a09e",
"score": 30,
"data": {
"memberNickname": "batman"
},
"createdAt": 1772654392327,
"updatedAt": 1772654840839,
"tCode": "myGroupTournamentCode",
"isInitialTScore": false,
"tRank": 0,
"index": 0,
"rank": 1,
"groupName": "myGroupName",
"groupSummaryData": {},
"scoreUpdatedAt": 1768422184370
}
]
},
"status": 200
}