Get My Guild Requests
Retrieves the list of guilds the user has applied to join.
Check URL
This API uses the service-api.playnanoo.com domain.
API Information
- URL:
https://service-api.playnanoo.com/guild/v20230101/personal/request/search - 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 |
Response Data
RequestInfo Array
Each join request information includes the following fields:
Uid: Guild unique IDName: Guild nameMemberCount: Current member countMemberLimit: Member limitAutoJoin: Auto-join optionExtraData: Guild additional dataRequestedAt: Join request date and time
Code Example
void UMyGame::GetMyGuildRequests(const FString& DeviceId, const FString& TableCode)
{
// 플레이어 정보가 포함된 요청 바디 생성
TSharedPtr<FJsonObject> Body = FPlayNANOOHelper::CreateRequestBody();
Body->SetStringField(TEXT("device_id"), DeviceId);
Body->SetStringField(TEXT("table_code"), TableCode);
// JSON 문자열 변환
FString JsonBody = FPlayNANOOHelper::ToJsonString(Body);
// HTTP 요청
TSharedRef<IHttpRequest> Request = FHttpModule::Get().CreateRequest();
Request->SetURL(TEXT("https://service-api.playnanoo.com/guild/v20230101/personal/request/search"));
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))
{
int32 Total = JsonObject->GetIntegerField(TEXT("Total"));
const TArray<TSharedPtr<FJsonValue>>* RequestsArray;
if (JsonObject->TryGetArrayField(TEXT("Requests"), RequestsArray))
{
UE_LOG(LogTemp, Log, TEXT("가입 신청 목록 조회 성공! 총 %d개"), Total);
for (const auto& RequestValue : *RequestsArray)
{
TSharedPtr<FJsonObject> Request = RequestValue->AsObject();
FString Name = Request->GetStringField(TEXT("Name"));
FString Uid = Request->GetStringField(TEXT("Uid"));
UE_LOG(LogTemp, Log, TEXT("Guild: %s"), *Name);
}
}
}
}
});
Request->ProcessRequest();
}
Authentication Required
This API requires Bearer token authentication. You must first log in to obtain an access token.
Usage
Use this API to:
- Check which guilds the user has applied to join
- Display the number of pending join requests
- Provide a guild list when request cancellation is needed
Response Data
Requests: List of guilds applied to join (TArray)Total: Total number of join requests- An empty array is returned if there are no join requests.
No Duplicate Requests
Only one join request per guild is allowed. You cannot apply to a guild you've already applied to.