Skip to main content

Get Joined Guild

API to retrieve information about the guild the user has joined.

URL Confirmation

This API uses the service-api.playnanoo.com domain.

API Information

  • URL: https://service-api.playnanoo.com/guild/v20230101/personal
  • Method: PUT
  • Authentication Required: Yes

Request Parameters

ParameterTypeRequiredDescription
table_codestringRequiredTable code
DeviceInfo Inheritance

The Req class of this API inherits from DeviceInfo. All properties of DeviceInfo are automatically included.

Response Data

Res Class

FieldTypeDescription
GuildUidstringGuild unique ID
GuildNamestringGuild name
GuildPointdoubleGuild points
GuildMemberCountintCurrent member count
GuildMemberLimitintMember limit
GuildAutoJoinstringAuto join status
GuildExtraDatastringGuild extra data
MemberGradeintMember grade
MemberPointintMember points
MemberInDatestringJoin date

Unity C# Implementation

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

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

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

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

yield return HttpClient.Send<Req, Res>(
UnityWebRequest.kHttpVerbPUT,
path,
requireToken: true,
body: this,
onSuccess: onSuccess,
onError: onError
);
}
}

[Serializable]
public class Res : BaseResponse
{
public string GuildUid;

public string GuildName;

public double GuildPoint;

public int GuildMemberCount;

public int GuildMemberLimit;

public string GuildAutoJoin;

public string GuildExtraData;

public int MemberGrade;

public int MemberPoint;

public string MemberInDate;
}
}

Usage Example

public void GetPersonalGuild()
{
GuildPersonal.Req req = new GuildPersonal.Req();

StartCoroutine(req.Send(
tableCode: "guild_table",
onSuccess: res =>
{
Debug.Log($"GuildUid: {res.GuildUid}, GuildName: {res.GuildName}");
Debug.Log($"GuildPoint: {res.GuildPoint}, MemberCount: {res.GuildMemberCount}/{res.GuildMemberLimit}");
Debug.Log($"MemberGrade: {res.MemberGrade}, MemberPoint: {res.MemberPoint}");
},
onError: (error) =>
{
Debug.LogError($"Joined guild retrieval failed: [{error.ErrorCode}] {error.Message}");
}
));
}