GetParentCurrency
Gets the parent player's currency for the given currency type or all currency types if null passed in.
Service | Operation |
---|---|
product | GET_PARENT_VC |
Method Parameters
Parameter | Description |
---|---|
currencyType | The currency type to retrieve or null if all currency types are being requested. |
levelName | Name of the parent level. |
Usage
http://localhost:3000
- C#
- C++
- Objective-C
- Java
- JavaScript
- Dart
- Cloud Code
- Raw
// Cloud Code Only
// Cloud Code Only
// Cloud Code Only
// Cloud Code Only
// Cloud Code Only
// Cloud Code only. To view example, switch to the Cloud Code tab
var currencyType = "coins";
var levelName = "master";
var productProxy = bridge.getProductServiceProxy();
var postResult = productProxy.getParentCurrency(currencyType, levelName);
if (postResult.status == 200) {
// Success!
}
{
"service": "product",
"operation": "GET_PARENT_VC",
"data": {
"vc_id": "coins",
"levelName": "master"
}
}
JSON Response
{
"status":200,
"data":{
"createdAt":1507311971256,
"currencyMap":{
"credits":{
"consumed":20,
"balance":180,
"purchased":0,
"awarded":200
}
},
"playerId":"dc129e18-af4c-439b-9b1d-e4b567fab38b",
"updatedAt":1521049401784
}
}