Skip to main content

Query Block History

Queries information about player service block.

Call Information

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

Call Information Details

ParameterDescriptionType
blockKeyBlock query 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");
}
});
}
}

Communication Result

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"
]
}
]
}

Communication Result Details

Data KeyDescriptionType
UserIdPlayer IDstring
ReasonReason for blockstring
PermanentPermanently block (Y / N)string
ExpireDateExpire date for block
For permanent block : "permanent" provided
string
TimeUntilExpireTime until block expires
For permanent block : -1 provided
string
ServicesBlock service codesarray