Skip to main content

Query Block History

Queries player service block information.

Call Information

public void Reason (string blockKey, PlayNANOODelegate callback) {}

Call Details

ParameterDescriptionType
blockKeyBlock lookup keyString
callbackCommunication ResultPlayNANOODelegate

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 KeyDescriptionType
UserIdPlayer IDstring
ReasonBlock reasonstring
PermanentPermanent block status (Y / N)string
ExpireDateBlock expiration date
For permanent blocks: "permanent" provided
string
TimeUntilExpireTime remaining until block expires
For permanent blocks: -1 provided
string
ServicesBlock service codesarray