RegisterRewardCallback
Sets a reward handler for any API call results that return rewards.
Method Parameters
| Parameter | Description |
|---|---|
| rewardCallback | The reward callback handler. |
Usage
http://localhost:3000
- C#
- C++
- Objective-C
- Java
- JavaScript
- Dart
- Cloud Code
- Raw
_bc.RegisterRewardCallback(callbackFunction);
_bc->registerRewardCallback(this);
rewardBlock = ^(NSString *rewardsJson) { };
[_bc registerRewardCallback:rewardBlock];
_bc.registerRewardCallback(callback);
_bc.registerRewardCallback(rewardCallback);
void rewardCallback(Map<String, dynamic>? jsonResponse) {
// ...
};
_bc.registerRewardCallback(rewardCallback);
// N/A
// N/A
JSON Response
{
"status": 200,
"apiRewards": [
{
"service": "authenticationV2",
"operation": "AUTHENTICATE",
"rewards": {
"rewardDetails": {
// the reward depending on type (see docs)
}
}
}
]
}