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
| Parameter | Type | Required | Description |
|---|---|---|---|
| player_uuid | string | Required | UUID of the player to query |
| storage_key | string | Required | Key of the data to load |
Response Data
| Field | Type | Description |
|---|---|---|
| PlayerId | string | Player ID |
| StorageKey | string | Key of the saved data |
| StorageValue | string | Value 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.