Query Currency
Queries the in-game currency held by the player.
Call Information
CurrencyGet(String currencyCode, PlayNANOODelegate callback) {}
Call Details
| Parameter | Description | Type |
|---|---|---|
| currencyCode | Currency code | string |
| callback | Communication result | PlayNANOODelegate |
Source Code
using PlayNANOO;
public class PlayNANOOExample : MonoBehaviour
{
Plugin plugin;
void Awake()
{
plugin = Plugin.GetInstance();
string currencyCode = "string";
plugin.CurrencyManager.Get(currencyCode, (status, errorCode, jsonString, values) => {
if (status.Equals(Configure.PN_API_STATE_SUCCESS))
{
Debug.Log(values["amount"]);
}
else
{
Debug.Log("Fail");
}
});
}
}
Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
{
"amount": 100
}
Response Details
| Data Key | Description | Type |
|---|---|---|
| amount | Currency held | double |