Get Guild Join Requests
API to retrieve the list of guild join requests.
URL Confirmation
This API uses the service-api.playnanoo.com domain.
API Information
- URL:
https://service-api.playnanoo.com/guild/v20230101/member/request - Method:
PUT - Authentication Required: Yes
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| table_code | string | Required | Table code |
| uid | string | Required | Guild unique ID |
DeviceInfo Inheritance
The Req class of this API inherits from DeviceInfo. All properties of DeviceInfo are automatically included.
Response Data
Res Class
| Field | Type | Description |
|---|---|---|
| Items | List\<MemberItemModel> | List of members who requested to join |
MemberItemModel Structure
| Field | Type | Description |
|---|---|---|
| Uuid | string | Member UUID |
| Nickname | string | Nickname |
| Grade | int | Grade |
| Point | double | Points |
| ExtraData | string | Extra data |
| LastLoginDate | string | Last login date |
| InDate | string | Request date |
Unity C# Implementation
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Networking;
public class GuildMemberRequest
{
static string path = "https://service-api.playnanoo.com/guild/v20230101/member/request";
[Serializable]
public class Req : DeviceInfo
{
public string table_code;
public string uid;
public IEnumerator Send(
string tableCode,
string uid,
Action<Res> onSuccess,
Action<BaseResponse> onError
)
{
if (!string.IsNullOrEmpty(tableCode)) this.table_code = tableCode;
if (!string.IsNullOrEmpty(uid)) this.uid = uid;
yield return HttpClient.Send<Req, Res>(
UnityWebRequest.kHttpVerbPUT,
path,
requireToken: true,
body: this,
onSuccess: onSuccess,
onError: onError
);
}
}
[Serializable]
public class Res : BaseResponse
{
public List<MemberItemModel> Items;
}
[Serializable]
public class MemberItemModel
{
public string Uuid;
public string Nickname;
public int Grade;
public double Point;
public string ExtraData;
public string LastLoginDate;
public string InDate;
}
}
Usage Example
public void GetMemberRequests()
{
GuildMemberRequest.Req req = new GuildMemberRequest.Req();
StartCoroutine(req.Send(
tableCode: "guild_table",
uid: "guild_uid",
onSuccess: res =>
{
foreach (var item in res.Items)
{
Debug.Log($"Uuid: {item.Uuid}, Nickname: {item.Nickname}");
}
},
onError: (error) =>
{
Debug.LogError($"Join request retrieval failed: [{error.ErrorCode}] {error.Message}");
}
));
}