Skip to content

Commit

Permalink
Updated from pipeline, Version : 24.10.0
Browse files Browse the repository at this point in the history
  • Loading branch information
AccelByte-Build committed Feb 5, 2024
1 parent 35bbb5e commit 4e54134
Show file tree
Hide file tree
Showing 26 changed files with 594 additions and 25 deletions.
12 changes: 6 additions & 6 deletions .variables
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
export DO_UPDATE=true
export LEVEL=CRITICAL
export REPO_NAME=justice-unreal-sdk-plugin
export WORKDIR=/tmp/pipelines/5959756919/1143144526/
export COMMIT_HASH=b2a68124d03687644135edcc97e26a864d743bf4
export GIT_HASH=b2a68124d03687644135edcc97e26a864d743bf4
export VERSION=24.9.0
export REVISION_ID=24.9.0
export WORKDIR=/tmp/pipelines/6097312914/1164845733/
export COMMIT_HASH=bea6947586932e937ab7f6359e11f81e0863368b
export GIT_HASH=bea6947586932e937ab7f6359e11f81e0863368b
export VERSION=24.10.0
export REVISION_ID=24.10.0
export [email protected]
export COMMIT_MESSAGE_BASE64='Y2hvcmUocmVsZWFzZSk6IDI0LjkuMCAtIGNvbW1pdGVkIGFuZCB0YWdnZWQgYnkgSmVua2luc2Fnc1ZlcnNpb246IjMuNjUuMCIKCg=='
export COMMIT_MESSAGE_BASE64='Y2hvcmUocmVsZWFzZSk6IDI0LjEwLjAgLSBjb21taXRlZCBhbmQgdGFnZ2VkIGJ5IEplbmtpbnNhZ3NWZXJzaW9uOiIzLjY2LjAiCgo='
4 changes: 2 additions & 2 deletions AccelByteUe4Sdk.uplugin
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"FileVersion": 3,
"Version": 55,
"VersionName": "24.9.0",
"Version": 56,
"VersionName": "24.10.0",
"FriendlyName": "AccelByte Unreal Engine SDK",
"Description": "Official AccelByte SDK for Unreal Engine 4",
"Category": "Online Platform",
Expand Down
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,28 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## [24.10.0](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/branches/compare/24.10.0%0D24.9.0) (2024-02-05)


### Features

* add AMS fleet command API ([0933fe2](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/0933fe20a59a171e1ccf70b18a89f49c77c7f7ef))
* add endpoint to get other user 3rd party platform information ([f08ed7e](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/f08ed7e72cc49d94ccdd56fac0b96d213355e0fc))
* add new endpoint of UGC staging content ([675adc9](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/675adc9b05674c5b6ac2d848a0337e1869f746d8))
* **namespace:** encode namespace ([8da9113](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/8da9113825fe53ab10978d9ba0b29154f62e77ad))
* **namespace:** REVERT namespace encode ([da5ee04](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/da5ee046e3f697278c6812e01b22cc3604417da4))
* **platformHandler:** add OnPresenceChanged delegate to notify sdk if there any presence changed from platform ([733529c](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/733529cf7746c556a765ad2d2e03f2be67a4cf8e))


### Bug Fixes

* add missing FlightId header in Login with DeviceId functionality ([fcf9306](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/fcf9306f15ce942aea2f320fa1d8723df9bd3ff7))
* change achievement blueprint header ([8a7541d](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/8a7541d23cf1904b1f8e3c9ceed76a9cd34260ca))
* **lobby:** store notification message delegate handle, replace instead of add new delegate ([4a47490](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/4a47490a1e868239345bd72fd29a701b7595039a))
* move DisconnectFromExternalReconnect outside of the boundary ([cbe2e90](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/cbe2e902b1c225d123d550a4213db426b72cd3e7))
* remove validation for platform information request ([da1b7ce](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/da1b7ce9e0ce6f084a82015362606c36d4e59908))
* **settings:** ClientSecret is still using the old value when the key is not defined in the .ini file ([299a4f7](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/299a4f75be0418e72ce0b540e07d0c149bbbfcde))

## [24.9.0](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/branches/compare/24.9.0%0D24.8.0) (2024-01-18)


Expand Down
4 changes: 2 additions & 2 deletions Source/AccelByteUe4Sdk/Private/AccelByteUe4SdkModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class FAccelByteUe4SdkModule : public IAccelByteUe4SdkModuleInterface
virtual ESettingsEnvironment const& GetSettingsEnvironment() const override;
virtual FEnvironmentChangedDelegate& OnEnvironmentChanged() override;
virtual AccelByte::IAccelByteDataStorage * GetLocalDataStorage() override;
virtual AccelByte::FAccelBytePlatformHandler GetPlatformHandler() override;
virtual AccelByte::FAccelBytePlatformHandler& GetPlatformHandler() override;

private:
AccelByte::Settings ClientSettings{};
Expand Down Expand Up @@ -373,7 +373,7 @@ AccelByte::IAccelByteDataStorage * FAccelByteUe4SdkModule::GetLocalDataStorage()
}
}

AccelByte::FAccelBytePlatformHandler FAccelByteUe4SdkModule::GetPlatformHandler()
AccelByte::FAccelBytePlatformHandler& FAccelByteUe4SdkModule::GetPlatformHandler()
{
return this->PlatformHandler;
}
Expand Down
26 changes: 26 additions & 0 deletions Source/AccelByteUe4Sdk/Private/Api/AccelByteAMSApi.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// Copyright (c) 2024 AccelByte Inc. All Rights Reserved.
// This is licensed software from AccelByte Inc, for limitations
// and restrictions contact your company contract manager.

#include "Api/AccelByteAMSApi.h"
#include "Core/AccelByteReport.h"

AccelByte::Api::AMS::AMS(Credentials const& InCredentialsRef
, Settings const& InSettingsRef
, FHttpRetryScheduler& InHttpRef)
: FApiBase(InCredentialsRef, InSettingsRef, InHttpRef)
{}

AccelByte::Api::AMS::~AMS()
{}

void AccelByte::Api::AMS::GetAccount(THandler<FAccelByteModelsAMSGetAccountResponse> const& OnSuccess,
FErrorHandler const& OnError)
{
FReport::Log(FString(__FUNCTION__));

const FString Url = FString::Printf(TEXT("%s/v1/namespaces/{namespace}/account")
, *SettingsRef.AMSServerUrl);

HttpClient.ApiRequest(TEXT("GET"), Url, {}, FString(), OnSuccess, OnError);
}
94 changes: 94 additions & 0 deletions Source/AccelByteUe4Sdk/Private/Api/AccelByteUGCApi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,28 @@ FString UGC::ConvertUGCUtilitiesSortByToString(const EAccelByteUGCContentUtiliti
}
}

FString UGC::ConvertStagingContentSortByToString(const EAccelByteStagingContentUtilitiesSortBy& SortBy)
{
switch (SortBy)
{
case EAccelByteStagingContentUtilitiesSortBy::CREATED_TIME:
return TEXT("createdTime");
case EAccelByteStagingContentUtilitiesSortBy::CREATED_TIME_ASC:
return TEXT("createdTime:asc");
case EAccelByteStagingContentUtilitiesSortBy::CREATED_TIME_DESC:
return TEXT("createdTime:desc");
case EAccelByteStagingContentUtilitiesSortBy::UPDATED_TIME:
return TEXT("updatedTime");
case EAccelByteStagingContentUtilitiesSortBy::UPDATED_TIME_ASC:
return TEXT("updatedTime:asc");
case EAccelByteStagingContentUtilitiesSortBy::UPDATED_TIME_DESC:
return TEXT("updatedTime:desc");
default:
return TEXT("");
}
}


#pragma endregion Utils

void UGC::CreateContent(FString const& ChannelId
Expand Down Expand Up @@ -1824,5 +1846,77 @@ void UGC::UpdateLikeStatusToContentV2(FString const& ContentId

#pragma endregion UGC V2 (Like)

#pragma region UGC Staging Content

void UGC::GetStagingContents(EStagingContentRequestStatus Status
, THandler<FAccelByteModelsUGCPaginatedListStagingContentResponse> const& OnSuccess
, FErrorHandler const& OnError
, int32 Limit
, int32 Offset
, EAccelByteStagingContentUtilitiesSortBy SortBy)
{
FReport::Log(FString(__FUNCTION__));

const FString Url = FString::Printf(TEXT("%s/v2/public/namespaces/%s/users/%s/staging-contents")
, *SettingsRef.UGCServerUrl
, *CredentialsRef.GetNamespace()
, *CredentialsRef.GetUserId());

const TMap<FString, FString> QueryParams = {
{TEXT("status"), FAccelByteUtilities::GetUEnumValueAsString(Status)},
{TEXT("offset"), Offset >= 0 ? FString::FromInt(Offset) : TEXT("")},
{TEXT("limit"), Limit >= 0 ? FString::FromInt(Limit) : TEXT("")},
{TEXT("sortBy"), SortBy == EAccelByteStagingContentUtilitiesSortBy::NONE ? TEXT("") : ConvertStagingContentSortByToString(SortBy)}
};

HttpClient.ApiRequest(TEXT("GET"), Url, QueryParams, FString(), OnSuccess, OnError);
}

void UGC::GetStagingContentById(FString const& ContentId
, THandler<FAccelByteModelsUGCStagingContentResponse> const& OnSuccess, FErrorHandler const& OnError)
{
FReport::Log(FString(__FUNCTION__));

const FString Url = FString::Printf(TEXT("%s/v2/public/namespaces/%s/users/%s/staging-contents/%s")
, *SettingsRef.UGCServerUrl
, *CredentialsRef.GetNamespace()
, *CredentialsRef.GetUserId()
, *ContentId);

HttpClient.ApiRequest(TEXT("GET"), Url, OnSuccess, OnError);
}

void UGC::UpdateStagingContent(FString const& ContentId
, FAccelByteModelsUGCUpdateContentFileLocationRequestV2 UpdateRequest
, THandler<FAccelByteModelsUGCStagingContentResponse> const& OnSuccess, FErrorHandler const& OnError)
{
FReport::Log(FString(__FUNCTION__));

const FString Url = FString::Printf(TEXT("%s/v2/public/namespaces/%s/users/%s/staging-contents/%s")
, *SettingsRef.UGCServerUrl
, *CredentialsRef.GetNamespace()
, *CredentialsRef.GetUserId()
, *ContentId);

HttpClient.ApiRequest(TEXT("PUT"), Url, {}, UpdateRequest, OnSuccess, OnError);
}

void UGC::DeleteStagingContent(FString const& ContentId
, FVoidHandler const& OnSuccess
, FErrorHandler const& OnError)
{
FReport::Log(FString(__FUNCTION__));

const FString Url = FString::Printf(TEXT("%s/v2/public/namespaces/%s/users/%s/staging-contents/%s")
, *SettingsRef.UGCServerUrl
, *CredentialsRef.GetNamespace()
, *CredentialsRef.GetUserId()
, *ContentId);

HttpClient.ApiRequest(TEXT("DELETE"), Url, {}, FString(), OnSuccess, OnError);
}

#pragma endregion UGC Staging Content

}
}
12 changes: 9 additions & 3 deletions Source/AccelByteUe4Sdk/Private/Api/AccelByteUserApi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1827,10 +1827,16 @@ void User::GetUserOtherPlatformBasicPublicInfo(const FPlatformAccountInfoRequest
, const THandler<FAccountUserPlatformInfosResponse>& OnSuccess
, const FErrorHandler& OnError)
{
FReport::Log(FString(__FUNCTION__));
if (Request.UserIds.Num() <= 0)
{
OnError.ExecuteIfBound(static_cast<int32>(ErrorCodes::InvalidRequest), TEXT("Invalid request, UserIds is empty."));
return;
}

FReport::Log(FString(__FUNCTION__));
const FString Url = FString::Printf(TEXT("%s/v3/public/namespaces/%s/users/platforms")
, *SettingsRef.IamServerUrl
, *CredentialsRef.GetNamespace());
, *SettingsRef.IamServerUrl
, *CredentialsRef.GetNamespace());

HttpClient.ApiRequest(TEXT("POST"), Url, {}, Request, OnSuccess, OnError);
}
Expand Down
80 changes: 80 additions & 0 deletions Source/AccelByteUe4Sdk/Private/Blueprints/ABUGC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1049,4 +1049,84 @@ void UABUGC::ModifyContentShareCodeV2(FString const& ChannelId
);
}

void UABUGC::GetStagingContents(EStagingContentRequestStatus Status
, FDModelsUGCPaginatedListStagingContent const& OnSuccess
, FDErrorHandler const& OnError
, int32 Limit
, int32 Offset
, EAccelByteStagingContentUtilitiesSortBy SortBy)
{
ApiClientPtr->UGC.GetStagingContents(Status,
THandler<FAccelByteModelsUGCPaginatedListStagingContentResponse>::CreateLambda(
[OnSuccess](FAccelByteModelsUGCPaginatedListStagingContentResponse const& Response)
{
OnSuccess.ExecuteIfBound(Response);
}
),
FErrorHandler::CreateLambda(
[OnError](int32 Code, FString const& Message)
{
OnError.ExecuteIfBound(Code, Message);
}
), Limit, Offset, SortBy);
}

void UABUGC::GetStagingContentById(FString const& ContentId
, FDModelsUGCStagingContent const& OnSuccess
, FDErrorHandler const& OnError)
{
ApiClientPtr->UGC.GetStagingContentById(ContentId,
THandler<FAccelByteModelsUGCStagingContentResponse>::CreateLambda(
[OnSuccess](FAccelByteModelsUGCStagingContentResponse const& Response)
{
OnSuccess.ExecuteIfBound(Response);
}
),
FErrorHandler::CreateLambda(
[OnError](int32 Code, FString const& Message)
{
OnError.ExecuteIfBound(Code, Message);
}
));
}

void UABUGC::UpdateStagingContent(FString const& ContentId
, FAccelByteModelsUGCUpdateContentFileLocationRequestV2 const& UpdateRequest
, FDModelsUGCStagingContent const& OnSuccess
, FDErrorHandler const& OnError)
{
ApiClientPtr->UGC.UpdateStagingContent(ContentId, UpdateRequest,
THandler<FAccelByteModelsUGCStagingContentResponse>::CreateLambda(
[OnSuccess](FAccelByteModelsUGCStagingContentResponse const& Response)
{
OnSuccess.ExecuteIfBound(Response);
}
),
FErrorHandler::CreateLambda(
[OnError](int32 Code, FString const& Message)
{
OnError.ExecuteIfBound(Code, Message);
}
));
}

void UABUGC::DeleteStagingContent(FString const& ContentId
, FDHandler const& OnSuccess
, FDErrorHandler const& OnError)
{
ApiClientPtr->UGC.DeleteStagingContent(ContentId,
FVoidHandler::CreateLambda(
[OnSuccess]()
{
OnSuccess.ExecuteIfBound();
}
),
FErrorHandler::CreateLambda(
[OnError](int32 Code, FString const& Message)
{
OnError.ExecuteIfBound(Code, Message);
}
));
}


3 changes: 2 additions & 1 deletion Source/AccelByteUe4Sdk/Private/Core/AccelByteOauth2Api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,8 @@ void Oauth2::GetTokenWithDeviceId(const FString& ClientId
FString Content = FAccelByteUtilities::CreateQueryParams({
{TEXT("device_id"), *FGenericPlatformHttp::UrlEncode(*FAccelByteUtilities::GetDeviceId())},
{TEXT("createHeadless"), bCreateHeadless ? TEXT("true") : TEXT("false")},
}, TEXT(""));
{TEXT("additionalData"), ConstructAdditionalData()},
}, TEXT(""));
Request->SetContentAsString(Content);

FRegistry::HttpRetryScheduler.ProcessRequest(Request, CreateHttpResultHandler(OnSuccess, OnError), FPlatformTime::Seconds());
Expand Down
2 changes: 2 additions & 0 deletions Source/AccelByteUe4Sdk/Private/Core/AccelByteRegistry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include "Api/AccelByteGameTelemetryApi.h"
#include "Api/AccelByteAgreementApi.h"
#include "Api/AccelByteAchievementApi.h"
#include "Api/AccelByteAMSApi.h"
#include "Api/AccelByteSessionBrowserApi.h"
#include "Api/AccelByteTurnManagerApi.h"
#include "Api/AccelByteUGCApi.h"
Expand Down Expand Up @@ -123,6 +124,7 @@ Api::SessionBrowser FRegistry::SessionBrowser{ FRegistry::Credentials, FRegistry
Api::TurnManager FRegistry::TurnManager{ FRegistry::Credentials, FRegistry::Settings, HttpRetryScheduler };
Api::Session FRegistry::Session{ FRegistry::Credentials, FRegistry::Settings, FRegistry::HttpRetryScheduler };
Api::MatchmakingV2 FRegistry::MatchmakingV2{ FRegistry::Credentials, FRegistry::Settings, FRegistry::HttpRetryScheduler };
Api::AMS FRegistry::AMS{ FRegistry::Credentials, FRegistry::Settings, FRegistry::HttpRetryScheduler };
#pragma endregion

#pragma region Game Client Analytics
Expand Down
7 changes: 6 additions & 1 deletion Source/AccelByteUe4Sdk/Private/Core/AccelByteSettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ void Settings::LoadSettings(const FString& SectionPath)
{
if (GConfig->GetString(*SectionPath, TEXT("ClientId"), ClientId, GEngineIni))
{
GConfig->GetString(*SectionPath, TEXT("ClientSecret"), ClientSecret, GEngineIni);
if (!GConfig->GetString(*SectionPath, TEXT("ClientSecret"), ClientSecret, GEngineIni))
{
ClientSecret = TEXT("");
}
}
else
{
Expand Down Expand Up @@ -103,6 +106,8 @@ void Settings::LoadSettings(const FString& SectionPath)

GDPRServerUrl = GetClientConfigUrlValue(SectionPath, TEXT("GDPRServerUrl"), BaseUrl, TEXT("gdpr"));

AMSServerUrl = GetClientConfigUrlValue(SectionPath, TEXT("AMSServerUrl"), BaseUrl, TEXT("ams"));

LoadFallback(SectionPath, TEXT("AppId"), AppId);

if (!GConfig->GetString(*DefaultSection, TEXT("CustomerName"), CustomerName, GEngineIni))
Expand Down
Loading

0 comments on commit 4e54134

Please sign in to comment.