Skip to main content

Query Total Currency

Queries information about all the in-game currency player owns.

Call Information

CurrencyAll(PlayNANOODelegate callback) {}

Call Information Details

ParameterDescriptionType
callbackCommunication resultPlayNANOODelegate

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 KeyDescriptionType
items.currencyCurrency codestring
items.amountAmount owneddouble