Get Guild Members
API to retrieve the list of guild members.
URL Confirmation
This API uses the service-api.playnanoo.com domain.
API Information
- URL:
https://service-api.playnanoo.com/guild/v20230101/member/search - 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> | Member list |
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 | Join date |
Unity C# Implementation
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Networking;
public class GuildMemberSearch
{
static string path = "https://service-api.playnanoo.com/guild/v20230101/member/search";
[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 SearchMembers()
{
GuildMemberSearch.Req req = new GuildMemberSearch.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}, Grade: {item.Grade}");
}
},
onError: (error) =>
{
Debug.LogError($"Member retrieval failed: [{error.ErrorCode}] {error.Message}");
}
));
}