본문으로 건너뛰기

가입 신청 목록 조회

사용자가 가입 신청한 길드 목록을 조회하는 API입니다.

URL 확인

이 API는 service-api.playnanoo.com 도메인을 사용합니다.

API 정보

  • URL: https://service-api.playnanoo.com/guild/v20230101/personal/request/search
  • Method: PUT
  • 인증 필요: 예

요청 파라미터

파라미터타입필수설명
table_codestring필수테이블 코드
DeviceInfo 상속

이 API의 Req 클래스는 DeviceInfo를 상속받습니다. DeviceInfo의 모든 속성이 자동으로 포함됩니다.

응답 데이터

Res 클래스

필드타입설명
ItemsList\<SearchItemModel>가입 신청 목록

SearchItemModel 구조

필드타입설명
TableCodestring테이블 코드
Uidstring길드 고유 ID
Namestring길드 이름
Pointdouble길드 포인트
Countrystring국가 코드
MemberCountint현재 멤버 수
MemberLimitint멤버 제한 수
AutoJoinstring자동 가입 여부
ExtraDatastring추가 데이터
InDatestring길드 생성 일시
RequestInDatestring신청 일시

Unity C# 구현

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

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

[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 List<SearchItemModel> Items;
}

[Serializable]
public class SearchItemModel
{
public string TableCode;

public string Uid;

public string Name;

public double Point;

public string Country;

public int MemberCount;

public int MemberLimit;

public string AutoJoin;

public string ExtraData;

public string InDate;

public string RequestInDate;
}
}

사용 예제

public void GetMyGuildRequests()
{
GuildPersonalSearch.Req req = new GuildPersonalSearch.Req();

StartCoroutine(req.Send(
tableCode: "guild_table",
onSuccess: res =>
{
foreach (var item in res.Items)
{
Debug.Log($"Uid: {item.Uid}, Name: {item.Name}");
Debug.Log($"MemberCount: {item.MemberCount}/{item.MemberLimit}");
Debug.Log($"RequestInDate: {item.RequestInDate}");
}
},
onError: (error) =>
{
Debug.LogError($"가입 신청 목록 조회 실패: [{error.ErrorCode}] {error.Message}");
}
));
}