Register User Block
Blocks messages from specific users in chat. These messages remain blocked until unblocked.
Call Information
Chat.BlockPlayerAdd(string blockUserId, string blockUserName, PlayNANOODelegate callback) {}
Call Information Details
Parameter | Description | Type |
---|---|---|
blockUserId | Blocked user ID | string |
blockUserName | Blocked user's name or nickname | string |
callback | Communication result | PlayNANOODelegate |
Source Code
using PlayNANOO;
public class PlayNANOOExample : MonoBehaviour
{
Plugin plugin;
void Awake()
{
plugin = Plugin.GetInstance();
string blockUserId = "string";
string blockUserName = "string";
plugin.Chat.BlockPlayerAdd(blockUserId, blockUserName, OnChatBlockPlayerAddCallback);
}
void OnChatBlockPlayerAddCallback(string status, string errorCode, string jsonString, Dictionary<string, object> values)
{
if (status.Equals(Configure.PN_API_STATE_SUCCESS))
{
Debug.Log(values["Status"]);
}
else
{
Debug.Log("Fail");
}
}
}
Communication Result
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
{
"Status" : "String"
}
Communication Result Details
Data Key | Description | Type |
---|---|---|
Status | Operation result | string |