RevokePeerCurrency
Revoke the specified amount of currency from the peer user. Peer user's balance can go negative.
Service | Operation |
---|---|
virtualCurrency | REVOKE_PEER_VC |
Method Parameters
Parameter | Description |
---|---|
vcId | Type of currency (Ex. ticket, tokens) |
vcAmount | The amount of currency to be revoked. |
peerCode | The peer code of the peer. |
Usage
http://localhost:3000
- C#
- C++
- Objective-C
- Java
- JavaScript
- Dart
- Cloud Code
- Raw
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
var vcId = "tokens";
var vcAmount = 1;
var peerCode = "gameloot";
var virtualCurrencyProxy = bridge.getVirtualcurrencyServiceProxy();
var postResult = virtualCurrencyProxy.RevokePeerCurrency(vcId, vcAmount, peerCode);
{
"service":"virtualCurrency",
"operation":"REVOKE_PEER_VC",
"data":{
"vcId":"tokens",
"vcAmount":1,
"peerCode":"gameloot"
}
}
JSON Response
{
"data": {
"currencyMap": {
"peerVC1": {
"consumed": 0,
"balance": 9,
"purchased": 0,
"awarded": 10,
"revoked": 1
},
"peerVC2": {
"consumed": 0,
"balance": 0,
"purchased": 0,
"awarded": 0,
"revoked": 0
}
}
},
"status": 200
}