Query Currency
Queries in-game currency the player owns.
Call Information
CurrencyGet(String currencyCode, PlayNANOODelegate callback) {}
Call Information 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.CurrencyGet(currencyCode, (status, errorMessage, jsonString, values) => {
if (status.Equals(Configure.PN_API_STATE_SUCCESS))
{
Debug.Log(values["amount"]);
}
else
{
Debug.Log("Fail");
}
});
}
}
Communication Result
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
{
"amount": 100
}
Communication Result Details
Data Key | Description | Type |
---|---|---|
amount | Amount owned | double |