Skip to main content
Version: 5.7.0

GetCurrency

Gets the player's currency for the given currency type or all currency types if null passed in.

ServiceOperation
productGET_PLAYER_VC

Method Parameters

ParameterDescription
currencyTypeThe currency type to retrieve or null if all currency types are being requested.

Usage

http://localhost:3000
string currencyType = "coins";
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.ProductService.GetCurrency(currencyType, successCallback, failureCallback);
JSON Response
{
"status": 200,
"data": {
"updatedAt": 1479752110785,
"currencyMap": {
"gems": {
"purchased": 0,
"balance": 12212,
"consumed": 133,
"awarded": 12345
}
},
"parentCurrency": {
"Master": {
"credits": {
"purchased": 0,
"balance": 12212,
"consumed": 133,
"awarded": 12345
}
}
},
"peerCurrency": {
"gameLootPeer": {
"tickets": {
"purchased": 0,
"balance": 12212,
"consumed": 133,
"awarded": 12345
}
}
},
"playerId": "362ce861-b749-4ce4-a57a-175232e21b5d",
"createdAt": 1459439058040
}
}