GetShieldExpiry
Gets the shield expiry for the given player id. Passing in a null player id will return the shield expiry for the current player. The value returned is the time in UTC millis when the shield will expire.
Service | Operation |
---|---|
matchMaking | GET_SHIELD_EXPIRY |
Method Parameters
Parameter | Description |
---|---|
playerId | The player id or use null to retrieve for the current player |
Usage
http://localhost:3000
- C#
- C++
- Objective-C
- Java
- JavaScript
- Dart
- Cloud Code
- Raw
string playerId = "player";
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.MatchMakingService.GetShieldExpiry(playerId, successCallback, failureCallback);
const char *playerId = "player";
_bc->getMatchMakingService()->getShieldExpiry(playerId, this);
NSString *playerId = @"player";
BCCompletionBlock successBlock; // define callback
BCErrorCompletionBlock failureBlock; // define callback
[[_bc matchMakingService] getShieldExpiry:playerId
completionBlock:successBlock
errorCompletionBlock:failureBlock
cbObject:nil];
String playerId = "player";
this; // implements IServerCallback
_bc.getMatchMakingService().getShieldExpiry(playerId, 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()));
}
var playerId = "player";
_bc.matchMaking.getShieldExpiry(playerId, result =>
{
var status = result.status;
console.log(status + " : " + JSON.stringify(result, null, 2));
});
var playerId = "player";
ServerResponse result = await _bc.matchMakingService.getShieldExpiry(playerId:playerId);
if (result.statusCode == 200) {
print("Success");
} else {
print("Failed ${result.error['status_message'] ?? result.error}");
}
var playerId = "player";
var matchMakingProxy = bridge.getMatchMakingServiceProxy();
var postResult = matchMakingProxy.getShieldExpiry(playerId);
if (postResult.status == 200) {
// Success!
}
{
"playerId": "player"
}
JSON Response
{
"status": 200,
"data": {
"shieldExpiry": 1433259734956
}
}