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
virtualCurrencyGET_PLAYER_VC

Method Parameters

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

Usage

http://localhost:3000
string vcId = "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.VirtualCurrencyService.GetCurrency(vcId, successCallback, failureCallback);
JSON Response
{
"status": 200,
"data": {
"currencyMap": {
"gems": {
"purchased": 0,
"balance": 12212,
"consumed": 133,
"awarded": 12345,
"revoked": 0
}
},
"parentCurrency": {
"Master": {
"credits": {
"purchased": 0,
"balance": 12212,
"consumed": 133,
"awarded": 12345,
"revoked": 0
}
}
},
"peerCurrency": {
"gameLootPeer": {
"tickets": {
"purchased": 0,
"balance": 12212,
"consumed": 133,
"awarded": 12345,
"revoked": 0
}
}
}
}
}