GetEligiblePromotions
Get eligible promotions.
Service | Operation |
---|---|
appStore | ELIGIBLE_PROMOTIONS |
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.AppStoreService.GetEligiblePromotions(successCallback, failureCallback);
_bc->getAppStoreService()->getEligiblePromotions(this);
BCCompletionBlock successBlock; // define callback
BCErrorCompletionBlock failureBlock; // define callback
[[_bc appStoreService] getEligiblePromotions:successBlock
errorCompletionBlock:failureBlock
cbObject:nil];
this; // implements IServerCallback
_bc.getAppStoreService().getEligiblePromotions(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.appStore.getEligiblePromotions(result =>
{
var status = result.status;
console.log(status + " : " + JSON.stringify(result, null, 2));
});
ServerResponse result = await _bc.appStoreService.getEligiblePromotions();
if (result.statusCode == 200) {
print("Success");
} else {
print("Failed ${result.error['status_message'] ?? result.error}");
}
var appStoreProxy = bridge.getAppStoreServiceProxy();
var postResult = appStoreProxy.getEligiblePromotions();
if (postResult.status == 200) {
// Success!
}
{
"service": "appStore",
"operation": "ELIGIBLE_PROMOTIONS"
}
JSON Response
{
"status": 200,
"data": {
"promotions": [
{
"gameId": "10019",
"promotionId": 9,
"type": "SCHEDULED",
"name": "session >= 2",
"message": "test1",
"enabled": true,
"targetAllUsers": false,
"segments": [
5
],
"prices": [
{
"itemId": "regGems150",
"priceId": 1
}
],
"notifications": [
{
"trigger": "ACTIVATED",
"notificationTemplateId": 10
}
],
"customJson": {
"key": "value"
},
"startAt": 1415374185745,
"endAt": 1415806185745,
"createdAt": 0,
"updatedAt": 1415729753294
}
]
}
}