封禁记录查询
查询玩家服务封禁信息。
调用信息
public void Reason (string blockKey, PlayNANOODelegate callback) {}
调用详细信息
| 参数 | 说明 | 类型 |
|---|---|---|
| blockKey | 封禁查询密钥 | String |
| callback | 通信结果 | PlayNANOODelegate |
源代码
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");
}
});
}
}
通信结果
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"
]
}
]
}
通信结果详细信息
| 数据键 | 说明 | 类型 |
|---|---|---|
| UserId | 玩家 ID | string |
| Reason | 封禁原因 | string |
| Permanent | 是否永久封禁(Y / N) | string |
| ExpireDate | 封禁到期日期 永久封禁时:提供 permanent | string |
| TimeUntilExpire | 距封禁到期剩余时间 永久封禁时:提供 -1 | string |
| Services | 封禁服务代码 | array |