Query Table
Queries leaderboard table information.
URL Confirmation
This API uses the service-api.playnanoo.com domain.
API Information
- URL:
https://service-api.playnanoo.com/leaderboard/v20240301/table/show - Method:
PUT - Authentication Required: Yes
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| uid | string | Required | Table code |
Response Data
| Field | Type | Description |
|---|---|---|
| Rotation | string | Rotation method |
| RotationCount | int | Current season number |
| RotationTimeLeft | int | Time remaining until season end (seconds) |
| RecordType | string | Record type |
| RecordSortType | string | Sort type |
| TotalIds | double | Total number of records |
Code Example
void UMyGame::ShowLeaderboardTable(const FString& TableCode)
{
// 요청 데이터 생성
// 플레이어 정보가 포함된 요청 바디 생성
TSharedPtr<FJsonObject> Body = FPlayNANOOHelper::CreateRequestBody();
Body->SetStringField(TEXT("uid"), TableCode);
// JSON 문자열 변환
FString JsonBody = FPlayNANOOHelper::ToJsonString(Body);
// HTTP 요청
TSharedRef<IHttpRequest> Request = FHttpModule::Get().CreateRequest();
Request->SetURL(TEXT("https://service-api.playnanoo.com/leaderboard/v20240301/table/show"));
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 Rotation = JsonObject->GetStringField(TEXT("Rotation"));
int32 RotationCount = JsonObject->GetIntegerField(TEXT("RotationCount"));
int32 RotationTimeLeft = JsonObject->GetIntegerField(TEXT("RotationTimeLeft"));
FString RecordType = JsonObject->GetStringField(TEXT("RecordType"));
double TotalIds = JsonObject->GetNumberField(TEXT("TotalIds"));
UE_LOG(LogTemp, Log, TEXT("순환 방식: %s, 시즌: %d, 남은 시간: %d초"), *Rotation, RotationCount, RotationTimeLeft);
UE_LOG(LogTemp, Log, TEXT("기록 타입: %s, 총 참가자: %.0f"), *RecordType, TotalIds);
}
}
});
Request->ProcessRequest();
}
Table Information
This API allows you to check the current settings and status of the leaderboard. You can obtain information such as whether the season is about to end soon and how many players are currently participating.
Season Timer
You can use RotationTimeLeft to display a season end timer in the UI. This allows players to know when the season will end.