Remove Player Block
Explains how to remove a specific player from the block list.
URL Verification
This API uses the service-api.playnanoo.com domain.
API Information
- URL:
https://service-api.playnanoo.com/chat/v20211101/block/remove - Method:
PUT - Authentication Required: Yes
Request Parameters
The Req class inherits from DeviceInfo.
| Field | Type | Description |
|---|---|---|
| block_user_id | string | User ID to unblock |
Response Data
Res
| Field | Type | Description |
|---|---|---|
| Status | string | Processing status |
Unity C# Implementation
using System;
using System.Collections;
using UnityEngine.Networking;
public class BlockPlayerRemove
{
static string path = "https://service-api.playnanoo.com/chat/v20211101/block/remove";
[Serializable]
public class Req : DeviceInfo
{
public string block_user_id;
public IEnumerator Send(string blockUserId, Action<Res> onSuccess, Action<BaseResponse> onError)
{
if (!string.IsNullOrEmpty(blockUserId)) this.block_user_id = blockUserId;
yield return HttpClient.Send<Req, Res>(
UnityWebRequest.kHttpVerbPUT,
path,
requireToken: true,
body: this,
onSuccess: onSuccess,
onError: onError
);
}
}
[Serializable]
public class Res : BaseResponse
{
public string Status;
}
}
Usage Example
using UnityEngine;
public class ChatExample : MonoBehaviour
{
public void BlockRemove()
{
string blockUserId = "CRCVTE1OMB8NPSW";
BlockPlayerRemove.Req req = new BlockPlayerRemove.Req();
StartCoroutine(req.Send(
blockUserId: blockUserId,
onSuccess: res =>
{
Debug.Log($"Status : {res.Status}");
},
onError: (error) =>
{
Debug.LogError($"BlockRemove failed: [{error.ErrorCode}] {error.Message}");
}
));
}
}