-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated from pipeline, Version : 25.0.0
- Loading branch information
1 parent
b3dd058
commit 8fe2040
Showing
35 changed files
with
2,641 additions
and
137 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/6224678981/1185140299/ | ||
export COMMIT_HASH=04e3cdf349660cc7a31c7d08f19031af80d7c552 | ||
export GIT_HASH=04e3cdf349660cc7a31c7d08f19031af80d7c552 | ||
export VERSION=24.11.0 | ||
export REVISION_ID=24.11.0 | ||
export WORKDIR=/tmp/pipelines/6350100201/1206134264/ | ||
export COMMIT_HASH=dc8b273dfc96d049a1995c05a3888d9b61625948 | ||
export GIT_HASH=dc8b273dfc96d049a1995c05a3888d9b61625948 | ||
export VERSION=25.0.0 | ||
export REVISION_ID=25.0.0 | ||
export [email protected] | ||
export COMMIT_MESSAGE_BASE64='Y2hvcmUocmVsZWFzZSk6IDI0LjExLjAgLSBjb21taXRlZCBhbmQgdGFnZ2VkIGJ5IEplbmtpbnNhZ3NWZXJzaW9uOiIzLjY4LjAiCgo=' | ||
export COMMIT_MESSAGE_BASE64='Y2hvcmUocmVsZWFzZSk6IDI1LjAuMCAtIGNvbW1pdGVkIGFuZCB0YWdnZWQgYnkgSmVua2luc2Fnc1ZlcnNpb246IjMuNjkuMCIKCg==' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
157 changes: 157 additions & 0 deletions
157
Source/AccelByteUe4Sdk/Private/Api/AccelByteChallengeApi.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,157 @@ | ||
// 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/AccelByteChallengeApi.h" | ||
#include "Core/AccelByteReport.h" | ||
|
||
namespace AccelByte | ||
{ | ||
namespace Api | ||
{ | ||
|
||
Challenge::Challenge(Credentials const& InCredentialsRef | ||
, Settings const& InSettingsRef | ||
, FHttpRetryScheduler& InHttpRef) | ||
: FApiBase(InCredentialsRef | ||
, InSettingsRef | ||
, InHttpRef) | ||
{} | ||
|
||
Challenge::~Challenge() | ||
{ | ||
} | ||
|
||
void Challenge::GetChallenges(const THandler<FAccelByteModelsGetChallengesResponse>& OnSuccess | ||
, const FErrorHandler& OnError | ||
, const EAccelByteModelsChallengeSortBy& SortBy | ||
, const EAccelByteModelsChallengeStatus& Status | ||
, uint64 Offset | ||
, uint64 Limit) | ||
{ | ||
FReport::Log(FString(__FUNCTION__)); | ||
|
||
const TMap<FString, FString> QueryParams = { | ||
{ TEXT("sortBy"), FAccelByteUtilities::ConvertChallengeSortByToString(SortBy) }, | ||
{ TEXT("status"), (Status != EAccelByteModelsChallengeStatus::NONE) ? FAccelByteUtilities::GetUEnumValueAsString(Status) : FString() }, | ||
{ TEXT("offset"), FString::FromInt(Offset) }, | ||
{ TEXT("limit"), FString::FromInt(Limit) }, | ||
}; | ||
|
||
const FString Url = FString::Printf(TEXT("%s/v1/public/namespaces/%s/challenges") | ||
, *SettingsRef.ChallengeServerUrl | ||
, *CredentialsRef.GetNamespace()); | ||
|
||
HttpClient.ApiRequest(TEXT("GET"), Url, QueryParams, FString(), OnSuccess, OnError); | ||
} | ||
|
||
void Challenge::GetScheduledChallengeGoals(const FString& ChallengeCode | ||
, const THandler<FAccelByteModelsGetScheduledChallengeGoalsResponse>& OnSuccess | ||
, const FErrorHandler& OnError | ||
, const TArray<FString>& Tags | ||
, uint64 Offset | ||
, uint64 Limit) | ||
{ | ||
FReport::Log(FString(__FUNCTION__)); | ||
|
||
FString TagsString{}; | ||
for (int64 Index = 0; Index < Tags.Num(); Index++) | ||
{ | ||
TagsString.Append(Tags[Index]); | ||
if (Index != Tags.Num() - 1) | ||
{ | ||
TagsString.AppendChar(','); | ||
} | ||
} | ||
|
||
const TMap<FString, FString> QueryParams{ | ||
{ TEXT("tags"), FGenericPlatformHttp::UrlEncode(TagsString) }, | ||
{ TEXT("offset"), FString::FromInt(Offset) }, | ||
{ TEXT("limit"), FString::FromInt(Limit) }, | ||
}; | ||
|
||
const FString Url = FString::Printf(TEXT("%s/v1/public/namespaces/%s/challenges/%s/goals") | ||
, *SettingsRef.ChallengeServerUrl | ||
, *CredentialsRef.GetNamespace() | ||
, *ChallengeCode); | ||
|
||
HttpClient.ApiRequest(TEXT("GET"), Url, QueryParams, FString(), OnSuccess, OnError); | ||
} | ||
|
||
void Challenge::GetChallengeProgress(const FString& ChallengeCode | ||
, const FString& GoalCode | ||
, const THandler<FAccelByteModelsChallengeProgressResponse>& OnSuccess | ||
, const FErrorHandler& OnError | ||
, uint64 Offset | ||
, uint64 Limit) | ||
{ | ||
FReport::Log(FString(__FUNCTION__)); | ||
|
||
const TMap<FString, FString> QueryParams{ | ||
{ TEXT("goalCode"), GoalCode }, | ||
{ TEXT("offset"), FString::FromInt(Offset) }, | ||
{ TEXT("limit"), FString::FromInt(Limit) }, | ||
}; | ||
|
||
const FString Url = FString::Printf(TEXT("%s/v1/public/namespaces/%s/users/me/progress/%s") | ||
, *SettingsRef.ChallengeServerUrl | ||
, *CredentialsRef.GetNamespace() | ||
, *ChallengeCode); | ||
|
||
HttpClient.ApiRequest(TEXT("GET"), Url, QueryParams, FString(), OnSuccess, OnError); | ||
} | ||
|
||
void Challenge::GetRewards(const THandler<FAccelByteModelsChallengeGetRewardStatusResponse>& OnSuccess | ||
, const FErrorHandler& OnError | ||
, const EAccelByteModelsChallengeRewardStatus& Status | ||
, const EAccelByteModelsChallengeSortBy& SortBy | ||
, uint64 Offset | ||
, uint64 Limit) | ||
{ | ||
FReport::Log(FString(__FUNCTION__)); | ||
|
||
TMap<FString, FString> QueryParams{ | ||
{ TEXT("sortBy"), FAccelByteUtilities::GetUEnumValueAsString(SortBy) }, | ||
{ TEXT("offset"), FString::FromInt(Offset) }, | ||
{ TEXT("limit"), FString::FromInt(Limit) }, | ||
}; | ||
|
||
if (Status != EAccelByteModelsChallengeRewardStatus::NONE) | ||
{ | ||
QueryParams.Add(TEXT("status"), FAccelByteUtilities::GetUEnumValueAsString(Status)); | ||
} | ||
|
||
const FString Url = FString::Printf(TEXT("%s/v1/public/namespaces/%s/users/me/rewards") | ||
, *SettingsRef.ChallengeServerUrl | ||
, *CredentialsRef.GetNamespace()); | ||
|
||
HttpClient.ApiRequest(TEXT("GET"), Url, QueryParams, FString(), OnSuccess, OnError); | ||
} | ||
|
||
void Challenge::ClaimReward(const FAccelByteModelsChallengeRewardClaimRequest& Request | ||
, const THandler<TArray<FAccelByteModelsChallengeReward>>& OnSuccess | ||
, const FErrorHandler& OnError) | ||
{ | ||
FReport::Log(FString(__FUNCTION__)); | ||
|
||
const FString Url = FString::Printf(TEXT("%s/v1/public/namespaces/%s/users/me/rewards/claim") | ||
, *SettingsRef.ChallengeServerUrl | ||
, *CredentialsRef.GetNamespace()); | ||
|
||
HttpClient.ApiRequest(TEXT("POST"), Url, {}, Request, OnSuccess, OnError); | ||
} | ||
|
||
void Challenge::EvaluateChallengeProgress(const FVoidHandler& OnSuccess, const FErrorHandler& OnError) | ||
{ | ||
FReport::Log(FString(__FUNCTION__)); | ||
|
||
const FString Url = FString::Printf(TEXT("%s/v1/public/namespaces/%s/users/me/progress/evaluate") | ||
, *SettingsRef.ChallengeServerUrl | ||
, *CredentialsRef.GetNamespace()); | ||
|
||
HttpClient.ApiRequest(TEXT("POST"), Url, {}, FString(), OnSuccess, OnError); | ||
} | ||
|
||
|
||
} // Namespace Api | ||
} // Namespace AccelByte |
73 changes: 73 additions & 0 deletions
73
Source/AccelByteUe4Sdk/Private/Api/AccelByteLoginQueueApi.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
// 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/AccelByteLoginQueueApi.h" | ||
#include "AccelByteUe4SdkModule.h" | ||
#include "Core/AccelByteRegistry.h" | ||
#include "Core/AccelByteReport.h" | ||
#include "Core/AccelByteHttpListenerExtension.h" | ||
#include "Core/AccelByteHttpRetryScheduler.h" | ||
#include "Core/AccelByteEnvironment.h" | ||
#include "Core/AccelByteOauth2Api.h" | ||
#include "Core/AccelByteUtilities.h" | ||
|
||
DECLARE_LOG_CATEGORY_EXTERN(LogAccelByteLoginQueue, Log, All); | ||
DEFINE_LOG_CATEGORY(LogAccelByteLoginQueue); | ||
|
||
using AccelByte::Api::Oauth2; | ||
|
||
namespace AccelByte | ||
{ | ||
namespace Api | ||
{ | ||
|
||
LoginQueue::LoginQueue(Credentials& InCredentialsRef | ||
, Settings& InSettingsRef | ||
, FHttpRetryScheduler& InHttpRef) | ||
: FApiBase(InCredentialsRef, InSettingsRef, InHttpRef) | ||
, UserCredentialsRef{InCredentialsRef} | ||
{ | ||
} | ||
|
||
LoginQueue::~LoginQueue() | ||
{} | ||
|
||
void LoginQueue::RefreshTicket(const FString& Ticket, const THandler<FAccelByteModelsLoginQueueTicketInfo>& OnSuccess, const FErrorHandler& OnError, const FString& Namespace) | ||
{ | ||
FReport::Log(FString(__FUNCTION__)); | ||
|
||
const FString Url = FString::Printf(TEXT("%s/v1/namespaces/%s/ticket") | ||
, *SettingsRef.LoginQueueServerUrl | ||
, Namespace.IsEmpty() ? *SettingsRef.Namespace : *Namespace); | ||
|
||
TMap<FString, FString> Headers{}; | ||
Headers.Add(TEXT("Authorization"), FString::Printf(TEXT("Bearer %s"), *Ticket)); | ||
|
||
HttpClient.Request(TEXT("GET"), Url, {}, FString(), Headers, THandler<FAccelByteModelsLoginQueueTicketInfo>::CreateLambda([Ticket, OnSuccess](const FAccelByteModelsLoginQueueTicketInfo& Response) | ||
{ | ||
FAccelByteModelsLoginQueueTicketInfo NewTicketInfo = Response; | ||
NewTicketInfo.Ticket = Ticket; | ||
OnSuccess.ExecuteIfBound(NewTicketInfo); | ||
}), OnError); | ||
} | ||
|
||
void LoginQueue::CancelTicket(const FString& Ticket, const FVoidHandler& OnSuccess, const FErrorHandler& OnError, const FString& Namespace) | ||
{ | ||
FReport::Log(FString(__FUNCTION__)); | ||
|
||
const FString Url = FString::Printf(TEXT("%s/v1/namespaces/%s/ticket") | ||
, *SettingsRef.LoginQueueServerUrl | ||
, Namespace.IsEmpty() ? *SettingsRef.Namespace : *Namespace); | ||
|
||
TMap<FString, FString> Headers{}; | ||
Headers.Add(TEXT("Authorization"), FString::Printf(TEXT("Bearer %s"), *Ticket)); | ||
Headers.Add(TEXT("Accept"), TEXT("application/json")); | ||
Headers.Add(TEXT("Content-Type"), TEXT("")); | ||
|
||
HttpClient.Request(TEXT("DELETE"), Url, {}, FString(), Headers, OnSuccess, OnError); | ||
} | ||
|
||
} // Namespace Api | ||
} // Namespace AccelByte |
Oops, something went wrong.