Skip to main content

Edit Join Request

API to modify additional data for a join request.

URL Confirmation

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

API Information

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

Request Parameters

ParameterTypeRequiredDescription
table_codestringRequiredTable code
extra_datastringRequiredExtra data
DeviceInfo Inheritance

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

Response Data

Res Class

FieldTypeDescription
StatusstringProcessing status

Unity C# Implementation

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;
}
}

Usage Example

public void EditPersonalRequest()
{
GuildPersonalEdit.Req req = new GuildPersonalEdit.Req();

StartCoroutine(req.Send(
tableCode: "guild_table",
extraData: "{\"message\":\"I would like to join\"}",
onSuccess: res =>
{
Debug.Log($"Status: {res.Status}");
},
onError: (error) =>
{
Debug.LogError($"Edit join request failed: [{error.ErrorCode}] {error.Message}");
}
));
}