Skip to main content
Version: 5.7.0

AbandonMatchWithSummaryData

Marks the given match as abandoned and sets the matchState to EXPIRED.

caution

Only a match whose current status is NOT_STARTED, PENDING or EXPIRED can be abandoned (status set to EXPIRED)

ServiceOperation
asyncMatchABANDON_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 abandoned!";
string summary = "{\"abandonBy\":{\"display\":\"Match abandoned by John Doe.\",\"player\":2,\"reason\":\"forfeit\"}}";
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.AbandonMatchWithSummaryData(ownerId, matchId, pushContent, summary, successCallback, failureCallback);
JSON Response
{
"status": 200,
"data": null
}