Skip to content

Commit

Permalink
https://docs.microsoft.com/en-us/gaming/playfab/release-notes/#230609
Browse files Browse the repository at this point in the history
  • Loading branch information
PlayFab SDK Team authored and PlayFab SDK Team committed Jun 13, 2023
2 parents 513dddf + e9b88ce commit eea9b7d
Show file tree
Hide file tree
Showing 744 changed files with 590,539 additions and 90 deletions.
4 changes: 2 additions & 2 deletions 4.23/ExampleProject/Plugins/PlayFab/PlayFab.uplugin
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
"FriendlyName": "PlayFab Marketplace Plugin",
"Version": 0,
"EngineVersion": "4.23.0",
"VersionName": "1.117.230529",
"VersionName": "1.118.230609",
"CreatedBy": "PlayFab and Phoenix Labs",
"CreatedByURL": "https://playfab.com/",
"DocsURL": "https://docs.microsoft.com/en-us/gaming/playfab/api-references/",
"SupportURL": "https://community.playfab.com/index.html",
"Category": "PlayFab",
"Description": "PlayFab Marketplace plugin for Unreal Engine 4.23 Current API version: 1.117.230529",
"Description": "PlayFab Marketplace plugin for Unreal Engine 4.23 Current API version: 1.118.230609",
"MarketplaceURL": "com.epicgames.launcher://ue/marketplace/content/217fdf581b784571af03d3fb6580368f",
"Modules": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -951,6 +951,12 @@ struct PLAYFAB_API FClientLinkSteamAccountRequest : public FPlayFabRequestCommon
*/
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "PlayFab | Client | Account Management Models")
FString SteamTicket;
/**
* True if ticket was generated using ISteamUser::GetAuthTicketForWebAPI() using "AzurePlayFab" as the identity string.
* False if the ticket was generated with ISteamUser::GetAuthSessionTicket().
*/
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "PlayFab | Client | Account Management Models")
bool TicketIsServiceSpecific = false;
};

USTRUCT(BlueprintType)
Expand Down Expand Up @@ -2363,6 +2369,12 @@ struct PLAYFAB_API FClientLoginWithSteamRequest : public FPlayFabRequestCommon
*/
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "PlayFab | Client | Authentication Models")
FString SteamTicket;
/**
* True if ticket was generated using ISteamUser::GetAuthTicketForWebAPI() using "AzurePlayFab" as the identity string.
* False if the ticket was generated with ISteamUser::GetAuthSessionTicket().
*/
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "PlayFab | Client | Authentication Models")
bool TicketIsServiceSpecific = false;
};

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ class PLAYFAB_API UPlayFabEventsAPI : public UOnlineBlueprintCallProxyBase
FDelegateOnSuccessWriteEvents onSuccess,
FDelegateOnFailurePlayFabError onFailure, UObject* customData);


// Implements FOnPlayFabEventsRequestCompleted
UFUNCTION(BlueprintCallable, Category = "PlayFab | Events | PlayStream Events ", meta = (BlueprintInternalUseOnly = "true"))
void HelperWriteEvents(FPlayFabBaseModel response, UObject* customData, bool successful);
Expand All @@ -87,6 +88,15 @@ class PLAYFAB_API UPlayFabEventsAPI : public UOnlineBlueprintCallProxyBase
FDelegateOnSuccessWriteTelemetryEvents onSuccess,
FDelegateOnFailurePlayFabError onFailure, UObject* customData);

/**
* Write batches of entity based events to as Telemetry events (bypass PlayStream) using a Telemetry Key. The namespace must be 'custom' or start
* with 'custom.'
*/
UFUNCTION(BlueprintCallable, Category = "PlayFab | Events | PlayStream Events ", meta = (BlueprintInternalUseOnly = "true"))
static UPlayFabEventsAPI* WriteTelemetryEventsWithTelemetryKey(FEventsWriteEventsRequest request, FString telemetryKey,
FDelegateOnSuccessWriteTelemetryEvents onSuccess,
FDelegateOnFailurePlayFabError onFailure, UObject* customData);

// Implements FOnPlayFabEventsRequestCompleted
UFUNCTION(BlueprintCallable, Category = "PlayFab | Events | PlayStream Events ", meta = (BlueprintInternalUseOnly = "true"))
void HelperWriteTelemetryEvents(FPlayFabBaseModel response, UObject* customData, bool successful);
Expand All @@ -97,6 +107,7 @@ class PLAYFAB_API UPlayFabEventsAPI : public UOnlineBlueprintCallProxyBase
FString PlayFabRequestURL;

bool useEntityToken = false;
bool useTelemetryKey = false;
bool useSecretKey = false;
bool useSessionTicket = false;
bool returnsSessionTicket = false;
Expand All @@ -107,6 +118,7 @@ class PLAYFAB_API UPlayFabEventsAPI : public UOnlineBlueprintCallProxyBase
FString ResponseContent;
int32 ResponseCode;
UObject* mCustomData;
FString telemetryKey;

FDelegateOnFailurePlayFabError OnFailure;
FDelegateOnSuccessWriteEvents OnSuccessWriteEvents;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1977,6 +1977,7 @@ UPlayFabClientAPI* UPlayFabClientAPI::LinkSteamAccount(FClientLinkSteamAccountRe
} else {
OutRestJsonObj->SetStringField(TEXT("SteamTicket"), request.SteamTicket);
}
OutRestJsonObj->SetBoolField(TEXT("TicketIsServiceSpecific"), request.TicketIsServiceSpecific);

// Add Request to manager
manager->SetRequestObject(OutRestJsonObj);
Expand Down Expand Up @@ -5045,6 +5046,7 @@ UPlayFabClientAPI* UPlayFabClientAPI::LoginWithSteam(FClientLoginWithSteamReques
} else {
OutRestJsonObj->SetStringField(TEXT("SteamTicket"), request.SteamTicket);
}
OutRestJsonObj->SetBoolField(TEXT("TicketIsServiceSpecific"), request.TicketIsServiceSpecific);
OutRestJsonObj->SetStringField(TEXT("TitleId"), GetDefault<UPlayFabRuntimeSettings>()->TitleId);

// Add Request to manager
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,43 @@ UPlayFabEventsAPI* UPlayFabEventsAPI::WriteTelemetryEvents(FEventsWriteEventsReq
return manager;
}

/** Write batches of entity based events to as Telemetry events (bypass PlayStream) using a Telemetry Key. The namespace must be 'custom' or start with 'custom.' */
UPlayFabEventsAPI* UPlayFabEventsAPI::WriteTelemetryEventsWithTelemetryKey(FEventsWriteEventsRequest request,
FString telemetryKey,
FDelegateOnSuccessWriteTelemetryEvents onSuccess,
FDelegateOnFailurePlayFabError onFailure,
UObject* customData)
{
// Objects containing request data
UPlayFabEventsAPI* manager = NewObject<UPlayFabEventsAPI>();
if (manager->IsSafeForRootSet()) manager->AddToRoot();
UPlayFabJsonObject* OutRestJsonObj = NewObject<UPlayFabJsonObject>();
manager->mCustomData = customData;

// Assign delegates
manager->OnSuccessWriteTelemetryEvents = onSuccess;
manager->OnFailure = onFailure;
manager->OnPlayFabResponse.AddDynamic(manager, &UPlayFabEventsAPI::HelperWriteTelemetryEvents);

// Setup the request
manager->PlayFabRequestURL = "/Event/WriteTelemetryEvents";
manager->useTelemetryKey = true;
manager->telemetryKey = telemetryKey;

// Serialize all the request properties to json
if (request.CustomTags != nullptr) OutRestJsonObj->SetObjectField(TEXT("CustomTags"), request.CustomTags);
if (request.Events.Num() == 0) {
OutRestJsonObj->SetFieldNull(TEXT("Events"));
} else {
OutRestJsonObj->SetObjectArrayField(TEXT("Events"), request.Events);
}

// Add Request to manager
manager->SetRequestObject(OutRestJsonObj);

return manager;
}

// Implements FOnPlayFabEventsRequestCompleted
void UPlayFabEventsAPI::HelperWriteTelemetryEvents(FPlayFabBaseModel response, UObject* customData, bool successful)
{
Expand Down Expand Up @@ -308,6 +345,15 @@ void UPlayFabEventsAPI::Activate()
}
}

if (useTelemetryKey && !AuthSet)
{
if (!telemetryKey.IsEmpty())
{
HttpRequest->SetHeader(TEXT("X-TelemetryKey"), telemetryKey);
AuthSet = true;
}
}

HttpRequest->SetHeader(TEXT("Content-Type"), TEXT("application/json"));
HttpRequest->SetHeader(TEXT("X-PlayFabSDK"), pfSettings->getVersionString());
HttpRequest->SetHeader(TEXT("X-ReportErrorAsSuccess"), TEXT("true")); // FHttpResponsePtr doesn't provide sufficient information when an error code is returned
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -680,6 +680,7 @@ FString UPlayFabUtilities::getErrorText(int32 code)
case 6002: returnText = "MultiplayerServerBuildReferencedByMatchmakingQueue"; break;
case 6003: returnText = "MultiplayerServerBuildReferencedByBuildAlias"; break;
case 6004: returnText = "MultiplayerServerBuildAliasReferencedByMatchmakingQueue"; break;
case 6005: returnText = "PartySerializationError"; break;
case 7000: returnText = "ExperimentationExperimentStopped"; break;
case 7001: returnText = "ExperimentationExperimentRunning"; break;
case 7002: returnText = "ExperimentationExperimentNotFound"; break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@

namespace PlayFabCommon
{
const FString PlayFabCommonSettings::sdkVersion = "1.117.230529";
const FString PlayFabCommonSettings::sdkVersion = "1.118.230609";
const FString PlayFabCommonSettings::buildIdentifier = "adobuild_unrealmarketplaceplugin_142";
const FString PlayFabCommonSettings::versionString = "UE4MKPL-1.117.230529";
const FString PlayFabCommonSettings::versionString = "UE4MKPL-1.118.230609";

FString PlayFabCommonSettings::clientSessionTicket;
FString PlayFabCommonSettings::entityToken;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16054,6 +16054,12 @@ void PlayFab::ClientModels::FLinkSteamAccountRequest::writeJSON(JsonWriter& writ
writer->WriteValue(SteamTicket);
}

if (TicketIsServiceSpecific.notNull())
{
writer->WriteIdentifierPrefix(TEXT("TicketIsServiceSpecific"));
writer->WriteValue(TicketIsServiceSpecific);
}

writer->WriteObjectEnd();
}

Expand Down Expand Up @@ -16084,6 +16090,13 @@ bool PlayFab::ClientModels::FLinkSteamAccountRequest::readFromValue(const TShare
if (SteamTicketValue->TryGetString(TmpValue)) { SteamTicket = TmpValue; }
}

const TSharedPtr<FJsonValue> TicketIsServiceSpecificValue = obj->TryGetField(TEXT("TicketIsServiceSpecific"));
if (TicketIsServiceSpecificValue.IsValid() && !TicketIsServiceSpecificValue->IsNull())
{
bool TmpValue;
if (TicketIsServiceSpecificValue->TryGetBool(TmpValue)) { TicketIsServiceSpecific = TmpValue; }
}

return HasSucceeded;
}

Expand Down Expand Up @@ -18757,6 +18770,12 @@ void PlayFab::ClientModels::FLoginWithSteamRequest::writeJSON(JsonWriter& writer
writer->WriteValue(SteamTicket);
}

if (TicketIsServiceSpecific.notNull())
{
writer->WriteIdentifierPrefix(TEXT("TicketIsServiceSpecific"));
writer->WriteValue(TicketIsServiceSpecific);
}

if (!TitleId.IsEmpty() == false)
{
UE_LOG(LogTemp, Error, TEXT("This field is required: LoginWithSteamRequest::TitleId, PlayFab calls may not work if it remains empty."));
Expand Down Expand Up @@ -18817,6 +18836,13 @@ bool PlayFab::ClientModels::FLoginWithSteamRequest::readFromValue(const TSharedP
if (SteamTicketValue->TryGetString(TmpValue)) { SteamTicket = TmpValue; }
}

const TSharedPtr<FJsonValue> TicketIsServiceSpecificValue = obj->TryGetField(TEXT("TicketIsServiceSpecific"));
if (TicketIsServiceSpecificValue.IsValid() && !TicketIsServiceSpecificValue->IsNull())
{
bool TmpValue;
if (TicketIsServiceSpecificValue->TryGetBool(TmpValue)) { TicketIsServiceSpecific = TmpValue; }
}

const TSharedPtr<FJsonValue> TitleIdValue = obj->TryGetField(TEXT("TitleId"));
if (TitleIdValue.IsValid() && !TitleIdValue->IsNull())
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1220,6 +1220,12 @@ void PlayFab::EconomyModels::FCatalogPrice::writeJSON(JsonWriter& writer) const
}


if (UnitAmount.notNull())
{
writer->WriteIdentifierPrefix(TEXT("UnitAmount"));
writer->WriteValue(UnitAmount);
}

if (UnitDurationInSeconds.notNull())
{
writer->WriteIdentifierPrefix(TEXT("UnitDurationInSeconds"));
Expand All @@ -1241,6 +1247,13 @@ bool PlayFab::EconomyModels::FCatalogPrice::readFromValue(const TSharedPtr<FJson
}


const TSharedPtr<FJsonValue> UnitAmountValue = obj->TryGetField(TEXT("UnitAmount"));
if (UnitAmountValue.IsValid() && !UnitAmountValue->IsNull())
{
int32 TmpValue;
if (UnitAmountValue->TryGetNumber(TmpValue)) { UnitAmount = TmpValue; }
}

const TSharedPtr<FJsonValue> UnitDurationInSecondsValue = obj->TryGetField(TEXT("UnitDurationInSeconds"));
if (UnitDurationInSecondsValue.IsValid() && !UnitDurationInSecondsValue->IsNull())
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,17 @@ bool UPlayFabEventsAPI::WriteTelemetryEvents(
return HttpRequest->ProcessRequest();
}

bool UPlayFabEventsAPI::WriteTelemetryEvents(
EventsModels::FWriteEventsRequest& request,
FString telemetryKey,
const FWriteTelemetryEventsDelegate& SuccessDelegate,
const FPlayFabErrorDelegate& ErrorDelegate)
{
auto HttpRequest = PlayFabRequestHandler::SendRequest(nullptr, TEXT("/Event/WriteTelemetryEvents"), request.toJSONString(), TEXT("X-TelemetryKey"), telemetryKey);
HttpRequest->OnProcessRequestComplete().BindRaw(this, &UPlayFabEventsAPI::OnWriteTelemetryEventsResult, SuccessDelegate, ErrorDelegate);
return HttpRequest->ProcessRequest();
}

void UPlayFabEventsAPI::OnWriteTelemetryEventsResult(FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, bool bSucceeded, FWriteTelemetryEventsDelegate SuccessDelegate, FPlayFabErrorDelegate ErrorDelegate)
{
EventsModels::FWriteEventsResponse outResult;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,17 @@ bool UPlayFabEventsInstanceAPI::WriteTelemetryEvents(
return HttpRequest->ProcessRequest();
}

bool UPlayFabEventsInstanceAPI::WriteTelemetryEvents(
EventsModels::FWriteEventsRequest& request,
FString telemetryKey,
const FWriteTelemetryEventsDelegate& SuccessDelegate,
const FPlayFabErrorDelegate& ErrorDelegate)
{
auto HttpRequest = PlayFabRequestHandler::SendRequest(this->settings, TEXT("/Event/WriteTelemetryEvents"), request.toJSONString(), TEXT("X-TelemetryKey"), telemetryKey);
HttpRequest->OnProcessRequestComplete().BindRaw(this, &UPlayFabEventsInstanceAPI::OnWriteTelemetryEventsResult, SuccessDelegate, ErrorDelegate);
return HttpRequest->ProcessRequest();
}

void UPlayFabEventsInstanceAPI::OnWriteTelemetryEventsResult(FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, bool bSucceeded, FWriteTelemetryEventsDelegate SuccessDelegate, FPlayFabErrorDelegate ErrorDelegate)
{
EventsModels::FWriteEventsResponse outResult;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8372,11 +8372,18 @@ namespace ClientModels
*/
FString SteamTicket;

/**
* [optional] True if ticket was generated using ISteamUser::GetAuthTicketForWebAPI() using "AzurePlayFab" as the identity string.
* False if the ticket was generated with ISteamUser::GetAuthSessionTicket().
*/
Boxed<bool> TicketIsServiceSpecific;

FLinkSteamAccountRequest() :
FPlayFabCppRequestCommon(),
CustomTags(),
ForceLink(),
SteamTicket()
SteamTicket(),
TicketIsServiceSpecific()
{}

FLinkSteamAccountRequest(const FLinkSteamAccountRequest& src) = default;
Expand Down Expand Up @@ -9549,6 +9556,12 @@ namespace ClientModels
*/
FString SteamTicket;

/**
* [optional] True if ticket was generated using ISteamUser::GetAuthTicketForWebAPI() using "AzurePlayFab" as the identity string.
* False if the ticket was generated with ISteamUser::GetAuthSessionTicket().
*/
Boxed<bool> TicketIsServiceSpecific;

/**
* Unique identifier for the title, found in the Settings > Game Properties section of the PlayFab developer site when a
* title has been selected.
Expand All @@ -9563,6 +9576,7 @@ namespace ClientModels
InfoRequestParameters(nullptr),
PlayerSecret(),
SteamTicket(),
TicketIsServiceSpecific(),
TitleId()
{}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -667,12 +667,16 @@ namespace EconomyModels
{
// [optional] The amounts of the catalog item price. Each price can have up to 15 item amounts.
TArray<FCatalogPriceAmount> Amounts;
// [optional] The per-unit amount this price can be used to purchase.
Boxed<int32> UnitAmount;

// [optional] The per-unit duration this price can be used to purchase. The maximum duration is 100 years.
Boxed<double> UnitDurationInSeconds;

FCatalogPrice() :
FPlayFabCppBaseModel(),
Amounts(),
UnitAmount(),
UnitDurationInSeconds()
{}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,7 @@ namespace PlayFab
PlayFabErrorMultiplayerServerBuildReferencedByMatchmakingQueue = 6002,
PlayFabErrorMultiplayerServerBuildReferencedByBuildAlias = 6003,
PlayFabErrorMultiplayerServerBuildAliasReferencedByMatchmakingQueue = 6004,
PlayFabErrorPartySerializationError = 6005,
PlayFabErrorExperimentationExperimentStopped = 7000,
PlayFabErrorExperimentationExperimentRunning = 7001,
PlayFabErrorExperimentationExperimentNotFound = 7002,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,18 @@ namespace PlayFab
// ------------ Generated API calls
// Write batches of entity based events to PlayStream. The namespace of the Event must be 'custom' or start with 'custom.'.
bool WriteEvents(EventsModels::FWriteEventsRequest& request, const FWriteEventsDelegate& SuccessDelegate = FWriteEventsDelegate(), const FPlayFabErrorDelegate& ErrorDelegate = FPlayFabErrorDelegate());

/**
* Write batches of entity based events to as Telemetry events (bypass PlayStream). The namespace must be 'custom' or start
* with 'custom.'
*/
bool WriteTelemetryEvents(EventsModels::FWriteEventsRequest& request, const FWriteTelemetryEventsDelegate& SuccessDelegate = FWriteTelemetryEventsDelegate(), const FPlayFabErrorDelegate& ErrorDelegate = FPlayFabErrorDelegate());

/**
* Write batches of entity based events to as Telemetry events (bypass PlayStream) using a Telemetry Key. The namespace must be 'custom' or start
* with 'custom.'
*/
bool WriteTelemetryEvents(EventsModels::FWriteEventsRequest& request, FString telemetryKey, const FWriteTelemetryEventsDelegate& SuccessDelegate = FWriteTelemetryEventsDelegate(), const FPlayFabErrorDelegate& ErrorDelegate = FPlayFabErrorDelegate());

private:
// ------------ Generated result handlers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,19 @@ namespace PlayFab
// ------------ Generated API calls
// Write batches of entity based events to PlayStream. The namespace of the Event must be 'custom' or start with 'custom.'.
bool WriteEvents(EventsModels::FWriteEventsRequest& request, const FWriteEventsDelegate& SuccessDelegate = FWriteEventsDelegate(), const FPlayFabErrorDelegate& ErrorDelegate = FPlayFabErrorDelegate());

/**
* Write batches of entity based events to as Telemetry events (bypass PlayStream). The namespace must be 'custom' or start
* with 'custom.'
*/
bool WriteTelemetryEvents(EventsModels::FWriteEventsRequest& request, const FWriteTelemetryEventsDelegate& SuccessDelegate = FWriteTelemetryEventsDelegate(), const FPlayFabErrorDelegate& ErrorDelegate = FPlayFabErrorDelegate());

/**
* Write batches of entity based events to as Telemetry events (bypass PlayStream) using a Telemetry Key. The namespace must be 'custom' or start
* with 'custom.'
*/
bool WriteTelemetryEvents(EventsModels::FWriteEventsRequest& request, FString telemetryKey, const FWriteTelemetryEventsDelegate& SuccessDelegate = FWriteTelemetryEventsDelegate(), const FPlayFabErrorDelegate& ErrorDelegate = FPlayFabErrorDelegate());

private:
// ------------ Generated result handlers
void OnWriteEventsResult(FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, bool bSucceeded, FWriteEventsDelegate SuccessDelegate, FPlayFabErrorDelegate ErrorDelegate);
Expand Down
Loading

0 comments on commit eea9b7d

Please sign in to comment.