Query Currency
Queries in-game currency owned by the player.
Source Code
var result = pluginCurrency.get({
version : "v4",
parameters : {
currencyCode : "CURRENCY_CODE"
}
});
var parse = JSON.parse(result.body);
if (parse.error == undefined) {
log.debug(parse.amount);
return {
"status" : "success"
}
} else {
return {
"status" : "fail"
}
}
Request Parameter
Parameter | Description | Type |
---|---|---|
currencyCode | Currency code | string |
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 |