본문으로 건너뛰기

가입신청 조회 변경

가입 신청 시 추가 데이터를 변경하는 API입니다.

URL 확인

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

API 정보

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

요청 파라미터

파라미터타입필수설명
table_codestring필수테이블 코드
extra_datastring필수추가 데이터
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 GuildPersonalEdit
{
static string path = "https://service-api.playnanoo.com/guild/v20230101/personal/edit";

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

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

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 EditPersonalRequest()
{
GuildPersonalEdit.Req req = new GuildPersonalEdit.Req();

StartCoroutine(req.Send(
tableCode: "guild_table",
extraData: "{\"message\":\"가입 신청합니다\"}",
onSuccess: res =>
{
Debug.Log($"Status: {res.Status}");
},
onError: (error) =>
{
Debug.LogError($"가입신청 조회 변경 실패: [{error.ErrorCode}] {error.Message}");
}
));
}