Change Guild Master
Changes the guild master to another member.
Check URL
This API uses the service-api.playnanoo.com domain.
API Information
- URL:
https://service-api.playnanoo.com/guild/v20230101/member/changeMaster - Method:
PUT - Authentication Required: Yes (Bearer Token)
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| device_id | string | Required | Device ID |
| table_code | string | Required | Table code |
| uid | string | Required | Guild unique ID |
| member_uuid | string | Required | UUID of the member to designate as new master |
Response Data
Response Information
Status: Processing result
Code Example
void UMyGame::ChangeGuildMaster(const FString& DeviceId, const FString& TableCode, const FString& GuildUid, const FString& NewMasterUuid)
{
// 플레이어 정보가 포함된 요청 바디 생성
TSharedPtr<FJsonObject> Body = FPlayNANOOHelper::CreateRequestBody();
Body->SetStringField(TEXT("device_id"), DeviceId);
Body->SetStringField(TEXT("table_code"), TableCode);
Body->SetStringField(TEXT("uid"), GuildUid);
Body->SetStringField(TEXT("member_uuid"), NewMasterUuid);
// JSON 문자열 변환
FString JsonBody = FPlayNANOOHelper::ToJsonString(Body);
// HTTP 요청
TSharedRef<IHttpRequest> Request = FHttpModule::Get().CreateRequest();
Request->SetURL(TEXT("https://service-api.playnanoo.com/guild/v20230101/member/changeMaster"));
Request->SetVerb(TEXT("PUT"));
FPlayNANOOHelper::SetCommonHeaders(Request, true); // 인증 토큰 포함
Request->SetContentAsString(JsonBody);
Request->OnProcessRequestComplete().BindLambda(
[](FHttpRequestPtr Req, FHttpResponsePtr Res, bool bSuccess)
{
if (bSuccess && Res.IsValid())
{
TSharedPtr<FJsonObject> JsonObject;
TSharedRef<TJsonReader<>> Reader = TJsonReaderFactory<>::Create(Res->GetContentAsString());
if (FJsonSerializer::Deserialize(Reader, JsonObject))
{
FString Status = JsonObject->GetStringField(TEXT("Status"));
UE_LOG(LogTemp, Log, TEXT("길드 마스터 변경 성공!"));
UE_LOG(LogTemp, Log, TEXT("Status: %s"), *Status);
}
}
});
Request->ProcessRequest();
}
Authentication Required
This API requires Bearer token authentication. You must first log in to obtain an access token.
Permission Required
Changing the guild master requires current guild master permission. Only the current master can transfer master authority to another member.
Important
When transferring master authority, the current master will be changed to a regular member grade. This action should be done carefully, and it is recommended to implement a user confirmation process before execution.
Pre-transfer Checklist
Before changing the master, verify the following:
- Target Member Verification: Confirm the new master is a member of the guild
- Member Activity: Verify the target member is actively playing
- Trustworthiness: Confirm the member is trustworthy to manage the guild
- User Consent: Verify that the member who will become the new master has agreed
The master transfer cannot be reversed, so make this decision carefully.