Query Block History
Queries player service block information.
Call Information
public void Reason (string blockKey, PlayNANOODelegate callback) {}
Call Details
| Parameter | Description | Type |
|---|---|---|
| blockKey | Block lookup key | String |
| callback | Communication Result | PlayNANOODelegate |
Source Code
using PlayNANOO;
public class PlayNANOOExample : MonoBehaviour
{
Plugin plugin;
void Start()
{
plugin = Plugin.GetInstance();
plugin.BlockManager.Reason(blockKey, (status, errorCode, jsonSTring, values) =>
{
if (status.Equals(Configure.PN_API_STATE_SUCCESS))
{
foreach (Dictionary<string, object> value in (ArrayList)values["Items"])
{
Debug.Log(value["UserId"]);
Debug.Log(value["Reason"]);
Debug.Log(value["Permanent"]);
Debug.Log(value["ExpireDate"]);
Debug.Log(value["TimeUntilExpire"]);
foreach(string service in (string[])value["Services"])
{
Debug.Log(service);
}
}
}
else
{
Debug.Log("Fail");
}
});
}
}
Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
{
"Items" : [
{
"UserId" : "String",
"Reason" : "String",
"Permanent" : "String",
"ExpireDate" : "String",
"TimeUntilExpire" : "Integer",
"Services" : [
"String"
]
}
]
}
Response Details
| Data Key | Description | Type |
|---|---|---|
| UserId | Player ID | string |
| Reason | Block reason | string |
| Permanent | Permanent block status (Y / N) | string |
| ExpireDate | Block expiration date For permanent blocks: "permanent" provided | string |
| TimeUntilExpire | Time remaining until block expires For permanent blocks: -1 provided | string |
| Services | Block service codes | array |