跳转到主要内容

拒绝加入公会

拒绝公会加入请求的 API。

URL 确认

此 API 使用 service-api.playnanoo.com 域名。

API 信息

  • URL: https://service-api.playnanoo.com/guild/v20230101/member/reject
  • Method: PUT
  • 需要认证: 是

请求参数

参数类型必填说明
table_codestring必填表代码
uidstring必填公会唯一 ID
member_uuidstring必填要拒绝的成员 UUID
DeviceInfo 继承

此 API 的 Req 类继承自 DeviceInfo。DeviceInfo 的所有属性将自动包含。

响应数据

Res 类

字段类型说明
Statusstring处理状态

Unity C# 实现

using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Networking;

public class GuildMemberReject
{
static string path = "https://service-api.playnanoo.com/guild/v20230101/member/reject";

[Serializable]
public class Req : DeviceInfo
{
public string table_code;
public string uid;
public string member_uuid;

public IEnumerator Send(
string tableCode,
string uid,
string memberUuid,
Action<Res> onSuccess,
Action<BaseResponse> onError
)
{
if (!string.IsNullOrEmpty(tableCode)) this.table_code = tableCode;
if (!string.IsNullOrEmpty(uid)) this.uid = uid;
if (!string.IsNullOrEmpty(memberUuid)) this.member_uuid = memberUuid;

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;
}
}

使用示例

public void RejectMember()
{
GuildMemberReject.Req req = new GuildMemberReject.Req();

StartCoroutine(req.Send(
tableCode: "guild_table",
uid: "guild_uid",
memberUuid: "member_uuid",
onSuccess: res =>
{
Debug.Log($"Status: {res.Status}");
},
onError: (error) =>
{
Debug.LogError($"가입 거절 실패: [{error.ErrorCode}] {error.Message}");
}
));
}