Query Total Currency
Queries all in-game currency details of the player.
Source Code
var result = pluginCurrency.all({
version : "v4"
});
var parse = JSON.parse(result.body);
if (parse.error == undefined) {
for(var i = 0; i < parse.items.length; i++) {
log.debug(parse.items[i].currency);
log.debug(parse.items[i].amount);
}
return {
"status" : "success"
}
} else {
return {
"status" : "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 |
---|---|---|
currency | Currency code | string |
amount | Amount owned | double |