Skip to main content

Player Data Load

Load public data from another player.

URL Verification

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

API Information

  • URL: https://service-storage-api.playnanoo.com/storage/v20221001/playerDataLoad
  • Method: PUT
  • Authentication Required: Yes

Request Parameters

ParameterTypeRequiredDescription
player_uuidstringRequiredUUID of the player to query
storage_keystringRequiredKey of the data to load

Response Data

FieldTypeDescription
PlayerIdstringPlayer ID
StorageKeystringKey of the saved data
StorageValuestringValue of the saved data

Code Example

void UMyGame::LoadPlayerData(const FString& PlayerUUID, const FString& StorageKey)
{
// 플레이어 정보가 포함된 요청 바디 생성
TSharedPtr<FJsonObject> Body = FPlayNANOOHelper::CreateRequestBody();
Body->SetStringField(TEXT("player_uuid"), PlayerUUID);
Body->SetStringField(TEXT("storage_key"), StorageKey);

// JSON 문자열 변환
FString JsonBody = FPlayNANOOHelper::ToJsonString(Body);

// HTTP 요청
TSharedRef<IHttpRequest> Request = FHttpModule::Get().CreateRequest();
Request->SetURL(TEXT("https://service-storage-api.playnanoo.com/storage/v20221001/playerDataLoad"));
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 PlayerId = JsonObject->GetStringField(TEXT("PlayerId"));
FString Key = JsonObject->GetStringField(TEXT("StorageKey"));
FString Value = JsonObject->GetStringField(TEXT("StorageValue"));
UE_LOG(LogTemp, Log, TEXT("플레이어 데이터 조회 성공: %s = %s"), *Key, *Value);
}
}
});

Request->ProcessRequest();
}
Public Data

This API is for querying data from other players. Use it only for publicly shareable data such as rankings and friend information.

Security Notice

Do not store sensitive personal information this way. Only store data that is safe to be public.