Skip to main content
Version: 5.7.0

CompleteMatchWithSummaryData

Marks the given match as complete.

caution

Only a match whose current status is PENDING (at least one turn has occurred) or COMPLETE can be marked as COMPLETE

ServiceOperation
asyncMatchCOMPLETE_MATCH_WITH_SUMMARY_DATA

Method Parameters

ParameterDescription
ownerIdThe match owner id.
matchIdThe match id.
pushContentOptional push notification message to send to the other party. Refer to the Push Notification functions for the syntax required.
summaryOptional JSON object defining what the other player will see as a summary of the game when listing their games.

Usage

http://localhost:3000
string ownerId = "the-owner-id";
string matchId = "the-match-id";
string pushContent = "An async-match has been completed!";
string summary = "{\"completedBy\":{\"display\":\"John Doe wins!\",\"player\":2,\"reason\":\"victory\"}}";
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.AsyncMatchService.CompleteMatchWithSummaryData(ownerId, matchId, pushContent, summary, successCallback, failureCallback);
JSON Response
{
"status": 200,
"data": null
}