Query Total Currency
Queries information about all the in-game currency player owns.
Call Information
CurrencyAll(PlayNANOODelegate callback) {}
Call Information Details
Parameter | Description | Type |
---|---|---|
callback | Communication result | PlayNANOODelegate |
Source Code
using PlayNANOO;
public class PlayNANOOExample : MonoBehaviour
{
Plugin plugin;
void Awake()
{
plugin = Plugin.GetInstance();
plugin.CurrencyAll((status, errorMessage, jsonString, values) => {
if (status.Equals(Configure.PN_API_STATE_SUCCESS))
{
foreach(Dictionary<string, object> item in (ArrayList)values["items"])
{
Debug.Log(item["currency"]);
Debug.Log(item["amount"]);
}
}
else
{
Debug.Log("Fail");
}
});
}
}
Communication Result
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
{
"items" : [
{
"currency": "CurrencyCode",
"amount": 100
}
]
}
Communication Result Details
Data Key | Description | Type |
---|---|---|
items.currency | Currency code | string |
items.amount | Amount owned | double |