Query Player Block History
Queries player block information.
Source Code
playNANOOHandlers.blockReason = function(args) {
var result = plugin['v20221201'].block.reason({
parameters : {
blockKey : "BlockKey"
}
});
if(result.statusCode == 200) {
const parse = JSON.parse(result.body.toString());
for(var i = 0; i < parse.Items.length; i++) {
log.debug(parse.Items[i].Reason);
log.debug(parse.Items[i].Permanent);
log.debug(parse.Items[i].ExpireDate);
log.debug(parse.Items[i].ExpireTime);
log.debug(parse.Items[i].TimeUntilExpire);
for(var j = 0; j <parse.Items[i].Services.length; j++) {
log.debug(parse.Items[i].Services[j]);
}
}
return true;
} else {
return false;
}
}
Request Parameter
| Parameter | Description | Type |
|---|---|---|
| blockKey | Block query key received from the service block error code | string |
Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
{
"Items": [
{
"Reason": "Message",
"Permanent": "Y",
"Services": [
"inbox",
"chat"
],
"ExpireDate": "permanent",
"ExpireTime": "-1",
"TimeUntilExpire": "-1"
}
]
}
Response Details
| Data Key | Description | Type |
|---|---|---|
| Reason | Block reason | string |
| Permanent | Permanent block status (Y / N) | string |
| ExpireDate | Block expiration date For permanent blocks: permanent | string |
| ExpireTime | Block expiration date UnixTimeStamp | string |
| TimeUntilExpire | Time remaining until block expiration For permanent blocks: -1 | string |
| Services | Block service code | array |