Loading...
Searching...
No Matches
AccelByte::Api::Achievement Class Reference

Provide APIs to access Achievement service. More...

#include <AccelByteAchievementApi.h>

Inheritance diagram for AccelByte::Api::Achievement:

Public Member Functions

 Achievement (Credentials const &InCredentialsRef, Settings const &InSettingsRef, FHttpRetrySchedulerBase &InHttpRef, TSharedPtr< AccelByte::FApiClient, ESPMode::ThreadSafe > const &InApiClient=nullptr)
 Achievement (Credentials const &InCredentialsRef, Settings const &InSettingsRef, FHttpRetrySchedulerBase &InHttpRef, FAccelBytePlatformPtr const &InAccelBytePlatform)
FAccelByteTaskWPtr QueryAchievements (FString const &Language, EAccelByteAchievementListSortBy const &SortBy, THandler< FAccelByteModelsPaginatedPublicAchievement > const &OnSuccess, FErrorHandler const &OnError, int32 const &Offset=0, int32 const &Limit=20, FString const &TagQuery=TEXT(""), bool bGlobal=false)
 Query all achievements in the related namespace.
FAccelByteTaskWPtr GetAchievement (FString const &AchievementCode, THandler< FAccelByteModelsMultiLanguageAchievement > const &OnSuccess, FErrorHandler const &OnError)
 Get an specific achievement information.
FAccelByteTaskWPtr QueryUserAchievements (EAccelByteAchievementListSortBy const &SortBy, THandler< FAccelByteModelsPaginatedUserAchievement > const &OnSuccess, FErrorHandler const &OnError, int32 const &Offset=0, int32 const &Limit=20, bool PreferUnlocked=true, FString const &TagQuery=TEXT(""))
 [Deprecated] Query user's achievements. Include achieved and in-progress.
FAccelByteTaskWPtr QueryUserAchievements (EAccelByteGlobalAchievementListSortBy const &SortBy, THandler< FAccelByteModelsPaginatedUserAchievement > const &OnSuccess, FErrorHandler const &OnError, int32 const &Offset=0, int32 const &Limit=20, bool PreferUnlocked=true, FString const &TagQuery=TEXT(""))
 Query user's achievements. Include achieved and in-progress.
FAccelByteTaskWPtr QueryUserAchievementsByUserId (FString const &UserId, EAccelByteAchievementListSortBy const &SortBy, THandler< FAccelByteModelsPaginatedUserAchievement > const &OnSuccess, FErrorHandler const &OnError, int32 const &Offset=0, int32 const &Limit=20, bool PreferUnlocked=true, FString const &TagQuery=TEXT(""))
 Query other user's achievements. Include achieved and in-progress.
FAccelByteTaskWPtr UnlockAchievement (FString const &AchievementCode, FVoidHandler const &OnSuccess, FErrorHandler const &OnError)
 Unlock specific achievement.
FAccelByteTaskWPtr BulkUnlockAchievement (FAccelByteModelsAchievementBulkUnlockRequest const &AchievementsToUnlock, THandler< TArray< FAccelByteModelsAchievementBulkUnlockRespone > > const &UnlockResponses, FErrorHandler const &OnGeneralError)
 Unlock multiple achievement.
FAccelByteTaskWPtr QueryGlobalAchievements (FString const &AchievementCode, EAccelByteGlobalAchievementStatus const &AchievementStatus, EAccelByteGlobalAchievementListSortBy const &SortBy, THandler< FAccelByteModelsPaginatedUserGlobalAchievement > const &OnSuccess, FErrorHandler const &OnError, int32 const &Offset=0, int32 const &Limit=20, FString const &TagQuery=TEXT(""))
 Get the progress list of global achievements. Include achieved and in-progress.
FAccelByteTaskWPtr QueryGlobalAchievementContributors (FString const &AchievementCode, EAccelByteGlobalAchievementContributorsSortBy const &SortBy, THandler< FAccelByteModelsPaginatedGlobalAchievementContributors > const &OnSuccess, FErrorHandler const &OnError, int32 const &Offset=0, int32 const &Limit=20)
 Get the list of contributors for a global achievement.
FAccelByteTaskWPtr QueryGlobalAchievementUserContributed (FString const &AchievementCode, EAccelByteGlobalAchievementContributorsSortBy const &SortBy, THandler< FAccelByteModelsPaginatedGlobalAchievementUserContributed > const &OnSuccess, FErrorHandler const &OnError, int32 const &Offset=0, int32 const &Limit=20)
 Get the list of global achievements that have been contributed by the user.
FAccelByteTaskWPtr ClaimGlobalAchievements (FString const &AchievementCode, FVoidHandler const &OnSuccess, FErrorHandler const &OnError)
 Claim specific global achievement.
FAccelByteTaskWPtr GetTags (FString const &Name, EAccelByteAchievementListSortBy const &SortBy, THandler< FAccelByteModelsPaginatedPublicTag > const &OnSuccess, FErrorHandler const &OnError, int32 const &Offset=0, int32 const &Limit=20)
 Get available public achievement tag.
Public Member Functions inherited from AccelByte::FApiBase
 FApiBase (Credentials const &InCredentialsRef, Settings const &InSettingsRef, FHttpRetrySchedulerBase &InHttpRef, TSharedPtr< AccelByte::FApiClient, ESPMode::ThreadSafe > const &InApiClient)
 FApiBase (Credentials const &InCredentialsRef, Settings const &InSettingsRef, FHttpRetrySchedulerBase &InHttpRef, FAccelBytePlatformPtr const &InAccelBytePlatform)
void SetApiClient (TSharedPtr< AccelByte::FApiClient, ESPMode::ThreadSafe > const &InApiClient)

Additional Inherited Members

Protected Member Functions inherited from AccelByte::FApiBase
template<typename T>
bool ValidateAccelByteId (FString const &Id, EAccelByteIdHypensRule HypenRule, FString const &ErrorMessage, T const &OnError)
Protected Attributes inherited from AccelByte::FApiBase
TSharedRef< Credentials const, ESPMode::ThreadSafe > CredentialsRef
Settings const & SettingsRef
FHttpRetrySchedulerBaseHttpRef
FHttpClient HttpClient
FAccelBytePlatformPtr AccelBytePlatformPtr

Detailed Description

Provide APIs to access Achievement service.

Member Function Documentation

◆ BulkUnlockAchievement()

FAccelByteTaskWPtr AccelByte::Api::Achievement::BulkUnlockAchievement ( FAccelByteModelsAchievementBulkUnlockRequest const & AchievementsToUnlock,
THandler< TArray< FAccelByteModelsAchievementBulkUnlockRespone > > const & UnlockResponses,
FErrorHandler const & OnGeneralError )

Unlock multiple achievement.

Parameters
AchievementsToUnlockRequest of achievement that needs to be unlocked.
UnlockResponsesThis will be called when the operation completed. In a form of array for each achievement that was requested.
OnGeneralErrorThis will be called when the entire operation failed.
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ ClaimGlobalAchievements()

FAccelByteTaskWPtr AccelByte::Api::Achievement::ClaimGlobalAchievements ( FString const & AchievementCode,
FVoidHandler const & OnSuccess,
FErrorHandler const & OnError )

Claim specific global achievement.

Parameters
AchievementCodeThe global achievement code which will be claimed.
OnSuccessThis will be called when the operation succeeded.
OnErrorThis will be called when the operation failed.
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ GetAchievement()

FAccelByteTaskWPtr AccelByte::Api::Achievement::GetAchievement ( FString const & AchievementCode,
THandler< FAccelByteModelsMultiLanguageAchievement > const & OnSuccess,
FErrorHandler const & OnError )

Get an specific achievement information.

Parameters
AchievementCodeThe code of the expected achievement.
OnSuccessThis will be called when the operation succeeded. The result is const FAccelByteModelsMultiLanguageAchievement&.
OnErrorThis will be called when the operation failed.
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ GetTags()

FAccelByteTaskWPtr AccelByte::Api::Achievement::GetTags ( FString const & Name,
EAccelByteAchievementListSortBy const & SortBy,
THandler< FAccelByteModelsPaginatedPublicTag > const & OnSuccess,
FErrorHandler const & OnError,
int32 const & Offset = 0,
int32 const & Limit = 20 )

Get available public achievement tag.

Parameters
NameThe name of the public tag.
SortBySorting method for the public tag result.
OnSuccessThis will be called when the operation succeeded.
OnErrorThis will be called when the operation failed.
OffsetThe offset of the achievements result. Default value is 0.
LimitThe limit of the achievements result. Default value is 20.
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ QueryAchievements()

FAccelByteTaskWPtr AccelByte::Api::Achievement::QueryAchievements ( FString const & Language,
EAccelByteAchievementListSortBy const & SortBy,
THandler< FAccelByteModelsPaginatedPublicAchievement > const & OnSuccess,
FErrorHandler const & OnError,
int32 const & Offset = 0,
int32 const & Limit = 20,
FString const & TagQuery = TEXT(""),
bool bGlobal = false )

Query all achievements in the related namespace.

Parameters
LanguageThe language to display the appropriate achievement's name and description. If it is empty, it will use its default language. If the achievement does not have the expected language, it will use its default language.
SortBySorting method for the achievements result.
OnSuccessThis will be called when the operation succeeded. The result is const FAccelByteModelsPaginatedPublicAchievement&.
OnErrorThis will be called when the operation failed.
OffsetThe offset of the achievements result. Default value is 0.
LimitThe limit of the achievements result. Default value is 20.
TagQueryA query expression consists of tags to query the achievement from.
bGlobalTrue if the configuration to display global achievements.
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ QueryGlobalAchievementContributors()

FAccelByteTaskWPtr AccelByte::Api::Achievement::QueryGlobalAchievementContributors ( FString const & AchievementCode,
EAccelByteGlobalAchievementContributorsSortBy const & SortBy,
THandler< FAccelByteModelsPaginatedGlobalAchievementContributors > const & OnSuccess,
FErrorHandler const & OnError,
int32 const & Offset = 0,
int32 const & Limit = 20 )

Get the list of contributors for a global achievement.

Parameters
AchievementCodeThe achievement code.
SortBySorting method for the global achievements contributors result.
OnSuccessThis will be called when the operation succeeded. The result is const FAccelByteModelsPaginatedGlobalAchievementContributors&.
OnErrorThis will be called when the operation failed.
OffsetThe offset of the achievements result. Default value is 0.
LimitThe limit of the achievements result. Default value is 20.
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ QueryGlobalAchievements()

FAccelByteTaskWPtr AccelByte::Api::Achievement::QueryGlobalAchievements ( FString const & AchievementCode,
EAccelByteGlobalAchievementStatus const & AchievementStatus,
EAccelByteGlobalAchievementListSortBy const & SortBy,
THandler< FAccelByteModelsPaginatedUserGlobalAchievement > const & OnSuccess,
FErrorHandler const & OnError,
int32 const & Offset = 0,
int32 const & Limit = 20,
FString const & TagQuery = TEXT("") )

Get the progress list of global achievements. Include achieved and in-progress.

Parameters
AchievementCodeThe achievement code.
AchievementStatusThe status to display the appropriate achievements.
SortBySorting method for the global achievements result.
OnSuccessThis will be called when the operation succeeded. The result is const FAccelByteModelsPaginatedUserGlobalAchievement&.
OnErrorThis will be called when the operation failed.
OffsetThe offset of the achievements result. Default value is 0.
LimitThe limit of the achievements result. Default value is 20.
TagQueryA query expression consists of tags to query the achievement from.
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ QueryGlobalAchievementUserContributed()

FAccelByteTaskWPtr AccelByte::Api::Achievement::QueryGlobalAchievementUserContributed ( FString const & AchievementCode,
EAccelByteGlobalAchievementContributorsSortBy const & SortBy,
THandler< FAccelByteModelsPaginatedGlobalAchievementUserContributed > const & OnSuccess,
FErrorHandler const & OnError,
int32 const & Offset = 0,
int32 const & Limit = 20 )

Get the list of global achievements that have been contributed by the user.

Parameters
AchievementCodeThe achievement code.
SortBySorting method for the global achievements contributors result.
OnSuccessThis will be called when the operation succeeded. The result is const FAccelByteModelsPaginatedGlobalAchievementUserContributed&.
OnErrorThis will be called when the operation failed.
OffsetThe offset of the achievements result. Default value is 0.
LimitThe limit of the achievements result. Default value is 20.
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ QueryUserAchievements() [1/2]

FAccelByteTaskWPtr AccelByte::Api::Achievement::QueryUserAchievements ( EAccelByteAchievementListSortBy const & SortBy,
THandler< FAccelByteModelsPaginatedUserAchievement > const & OnSuccess,
FErrorHandler const & OnError,
int32 const & Offset = 0,
int32 const & Limit = 20,
bool PreferUnlocked = true,
FString const & TagQuery = TEXT("") )

[Deprecated] Query user's achievements. Include achieved and in-progress.

Parameters
SortBySorting method for the achievements result. Only support achieveAt, createdAt
OnSuccessThis will be called when the operation succeeded. The result is const FAccelByteModelsPaginatedUserAchievement&.
OnErrorThis will be called when the operation failed.
OffsetThe offset of the achievements result. Default value is 0.
LimitThe limit of the achievements result. Default value is 20.
PreferUnlockedTrue if the configuration to display unlocked achievements first active, the list order should display unlocked achievements first on top of locked achievements, and false otherwise. Default value is true.
TagQueryA query expression consists of tags to query the achievement from
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ QueryUserAchievements() [2/2]

FAccelByteTaskWPtr AccelByte::Api::Achievement::QueryUserAchievements ( EAccelByteGlobalAchievementListSortBy const & SortBy,
THandler< FAccelByteModelsPaginatedUserAchievement > const & OnSuccess,
FErrorHandler const & OnError,
int32 const & Offset = 0,
int32 const & Limit = 20,
bool PreferUnlocked = true,
FString const & TagQuery = TEXT("") )

Query user's achievements. Include achieved and in-progress.

Parameters
SortBySorting method for the achievements result.
OnSuccessThis will be called when the operation succeeded. The result is const FAccelByteModelsPaginatedUserAchievement&.
OnErrorThis will be called when the operation failed.
OffsetThe offset of the achievements result. Default value is 0.
LimitThe limit of the achievements result. Default value is 20.
PreferUnlockedTrue if the configuration to display unlocked achievements first active, the list order should display unlocked achievements first on top of locked achievements, and false otherwise. Default value is true.
TagQueryA query expression consists of tags to query the achievement from.
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ QueryUserAchievementsByUserId()

FAccelByteTaskWPtr AccelByte::Api::Achievement::QueryUserAchievementsByUserId ( FString const & UserId,
EAccelByteAchievementListSortBy const & SortBy,
THandler< FAccelByteModelsPaginatedUserAchievement > const & OnSuccess,
FErrorHandler const & OnError,
int32 const & Offset = 0,
int32 const & Limit = 20,
bool PreferUnlocked = true,
FString const & TagQuery = TEXT("") )

Query other user's achievements. Include achieved and in-progress.

Parameters
UserIdTarget user id to retrieve achievement data from
SortBySorting method for the achievements result.
OnSuccessThis will be called when the operation succeeded. The result is const FAccelByteModelsPaginatedUserAchievement&.
OnErrorThis will be called when the operation failed.
OffsetThe offset of the achievements result. Default value is 0.
LimitThe limit of the achievements result. Default value is 20.
PreferUnlockedTrue if the configuration to display unlocked achievements first active, the list order should display unlocked achievements first on top of locked achievements, and false otherwise. Default value is true.
TagQueryA query expression consists of tags to query the achievement from.
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ UnlockAchievement()

FAccelByteTaskWPtr AccelByte::Api::Achievement::UnlockAchievement ( FString const & AchievementCode,
FVoidHandler const & OnSuccess,
FErrorHandler const & OnError )

Unlock specific achievement.

Parameters
AchievementCodeThe achievement code which will be unlock.
OnSuccessThis will be called when the operation succeeded.
OnErrorThis will be called when the operation failed.
Returns
AccelByteTask object to track and cancel the ongoing API operation.