FindCompleteMatches
Returns all matches that are in a COMPLETE state for which the player is involved.
Service | Operation |
---|---|
asyncMatch | FIND_MATCHES_COMPLETED |
Usage
http://localhost:3000
- C#
- C++
- Objective-C
- Java
- JavaScript
- Dart
- Cloud Code
- Raw
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.FindCompleteMatches(successCallback, failureCallback);
_bc->getAsyncMatchService()->findCompleteMatches(this);
BCCompletionBlock successBlock; // define callback
BCErrorCompletionBlock failureBlock; // define callback
[[_bc asyncMatchService] findCompleteMatches:successBlock
errorCompletionBlock:failureBlock
cbObject:nil];
this; // implements IServerCallback
_bc.getAsyncMatchService().findCompleteMatches(this);
public void serverCallback(ServiceName serviceName, ServiceOperation serviceOperation, JSONObject jsonData)
{
System.out.print(String.format("Success | %s", jsonData.toString()));
}
public void serverError(ServiceName serviceName, ServiceOperation serviceOperation, int statusCode, int reasonCode, String jsonError)
{
System.out.print(String.format("Failed | %d %d %s", statusCode, reasonCode, jsonError.toString()));
}
_bc.asyncMatch.findCompleteMatches(result =>
{
var status = result.status;
console.log(status + " : " + JSON.stringify(result, null, 2));
});
ServerResponse result = await _bc.asyncMatchService.findCompleteMatches();
if (result.statusCode == 200) {
print("Success");
} else {
print("Failed ${result.error['status_message'] ?? result.error}");
}
var asyncMatchProxy = bridge.getAsyncMatchServiceProxy();
var postResult = asyncMatchProxy.findCompleteMatches();
if (postResult.status == 200) {
// Success!
}
{
"service": "asyncMatch",
"operation": "FIND_MATCHES_COMPLETED"
}
JSON Response
{
"status": 200,
"data": {
"results": [
{
"gameId": "109999",
"ownerId": "9ad4f990-5466-4d00-a334-de834e1ac4ec",
"matchId": "877dd25d-ea21-4857-ba2a-2134d0f5ace2",
"version": 2,
"players": [
{
"playerId": "9ad4f990-5466-4d00-a334-de834e1ac4ec",
"playerName": "",
"pictureUrl": null,
"summaryFriendData": null
},
{
"playerId": "963a2079-6e7a-48de-a4f2-8ab16c811975",
"playerName": "",
"pictureUrl": null,
"summaryFriendData": null
}
],
"status": {
"status": "COMPLETE",
"currentPlayer": "963a2079-6e7a-48de-a4f2-8ab16c811975"
},
"summary": null,
"createdAt": 1442586358023,
"updatedAt": 1442586374787
}
]
}
}