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

Interface for interacting with the AccelByte challenge service. More...

#include <AccelByteChallengeApi.h>

Inheritance diagram for AccelByte::Api::Challenge:

Public Member Functions

 Challenge (Credentials const &InCredentialsRef, Settings const &InSettingsRef, FHttpRetrySchedulerBase &InHttpRef, TSharedPtr< AccelByte::FApiClient, ESPMode::ThreadSafe > const &InApiClient=nullptr)
 Challenge (Credentials const &InCredentialsRef, Settings const &InSettingsRef, FHttpRetrySchedulerBase &InHttpRef, FAccelBytePlatformPtr const &InAccelBytePlatform)
FAccelByteTaskWPtr GetChallenges (THandler< FAccelByteModelsGetChallengesResponse > const &OnSuccess, FErrorHandler const &OnError, EAccelByteModelsChallengeSortBy SortBy=EAccelByteModelsChallengeSortBy::UPDATED_AT_DESC, EAccelByteModelsChallengeStatus Status=EAccelByteModelsChallengeStatus::NONE, uint64 Offset=0, uint64 Limit=20, FString Keyword=TEXT(""), TArray< FString > const &Tags={})
 Send a request to get all challenges.
FAccelByteTaskWPtr GetPreviousChallengeProgresses (FString const &ChallengeCode, int32 Index, THandler< FAccelByteModelsChallengeProgressResponse > const &OnSuccess, FErrorHandler const &OnError, FString const &GoalCode=TEXT(""), uint64 Offset=0, uint64 Limit=20, TArray< FString > const &Tags={})
 Send a request to get previous challenge progresses.
FAccelByteTaskWPtr GetChallengeProgress (FString const &ChallengeCode, FString const &GoalCode, THandler< FAccelByteModelsChallengeProgressResponse > const &OnSuccess, FErrorHandler const &OnError, uint64 Offset=0, uint64 Limit=20, TArray< FString > const &Tags={})
 Send a request to get current progress for a specific challenge.
FAccelByteTaskWPtr GetChallengeProgress (FString const &ChallengeCode, THandler< FAccelByteModelsChallengeProgressResponse > const &OnSuccess, FErrorHandler const &OnError, uint64 Offset=0, uint64 Limit=20, FString const &GoalCode=TEXT(""), TArray< FString > const &Tags={})
 Send a request to get current progress for a specific challenge.
FAccelByteTaskWPtr GetRewards (THandler< FAccelByteModelsChallengeGetRewardStatusResponse > const &OnSuccess, FErrorHandler const &OnError, EAccelByteModelsChallengeRewardStatus Status=EAccelByteModelsChallengeRewardStatus::NONE, EAccelByteModelsChallengeSortBy SortBy=EAccelByteModelsChallengeSortBy::UPDATED_AT_DESC, uint64 Offset=0, uint64 Limit=20)
 Send a request to get status of all challenge rewards.
FAccelByteTaskWPtr ClaimReward (FAccelByteModelsChallengeRewardClaimRequest const &Request, THandler< TArray< FAccelByteModelsChallengeReward > > const &OnSuccess, FErrorHandler const &OnError)
 Send a request to claim a single reward.
FAccelByteTaskWPtr EvaluateChallengeProgress (FVoidHandler const &OnSuccess, FErrorHandler const &OnError)
 Send a request to attempt to evaluate current progress toward all active challenges.
FAccelByteTaskWPtr EvaluateChallengeProgress (FAccelByteModelsChallengeEvaluateProgressOptionalParameter const &OptionalParameter, FVoidHandler const &OnSuccess, FErrorHandler const &OnError)
 Send a request to attempt to evaluate current progress toward all active challenges.
FAccelByteTaskWPtr ListSchedules (FString ChallengeCode, THandler< FAccelByteModelsChallengeListSchedulesResponse > const &OnSuccess, FErrorHandler const &OnError, FDateTime const &DateTime=FDateTime::MinValue(), uint64 Offset=0, uint64 Limit=20)
 Send a request to query the List schedules of given challenge.
FAccelByteTaskWPtr ListScheduleByGoal (FString ChallengeCode, FString GoalCode, THandler< FAccelByteModelsChallengeListScheduleByGoalResponse > const &OnSuccess, FErrorHandler const &OnError, uint64 Offset=0, uint64 Limit=20)
 Send a request to query the List schedules of given goal in a challenge.
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

Interface for interacting with the AccelByte challenge service.

Member Function Documentation

◆ ClaimReward()

FAccelByteTaskWPtr AccelByte::Api::Challenge::ClaimReward ( FAccelByteModelsChallengeRewardClaimRequest const & Request,
THandler< TArray< FAccelByteModelsChallengeReward > > const & OnSuccess,
FErrorHandler const & OnError )

Send a request to claim a single reward.

Parameters
RequestStructure containing IDs of rewards to claim
OnSuccessDelegate executed when request succeeds
OnErrorDelegate executed when request fails
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ EvaluateChallengeProgress() [1/2]

FAccelByteTaskWPtr AccelByte::Api::Challenge::EvaluateChallengeProgress ( FAccelByteModelsChallengeEvaluateProgressOptionalParameter const & OptionalParameter,
FVoidHandler const & OnSuccess,
FErrorHandler const & OnError )

Send a request to attempt to evaluate current progress toward all active challenges.

Parameters
OptionalParameterStruct containing optional parameters to specify the evaluation
OnSuccessDelegate executed when request succeeds
OnErrorDelegate executed when request fails
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ EvaluateChallengeProgress() [2/2]

FAccelByteTaskWPtr AccelByte::Api::Challenge::EvaluateChallengeProgress ( FVoidHandler const & OnSuccess,
FErrorHandler const & OnError )

Send a request to attempt to evaluate current progress toward all active challenges.

Parameters
OnSuccessDelegate executed when request succeeds
OnErrorDelegate executed when request fails
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ GetChallengeProgress() [1/2]

FAccelByteTaskWPtr AccelByte::Api::Challenge::GetChallengeProgress ( FString const & ChallengeCode,
FString const & GoalCode,
THandler< FAccelByteModelsChallengeProgressResponse > const & OnSuccess,
FErrorHandler const & OnError,
uint64 Offset = 0,
uint64 Limit = 20,
TArray< FString > const & Tags = {} )

Send a request to get current progress for a specific challenge.

Parameters
ChallengeCodeString code for the challenge to check progress for
GoalCodeString code for the specific challenge goal to get progress for
OnSuccessDelegate executed when request succeeds
OnErrorDelegate executed when request fails
OffsetNumber of goals to skip when returning goal progress list, defaults to 0
LimitNumber of goals to include when returning goal progress list, defaults to 20
TagsArray of tag strings used to filter resulting challenge progress list
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ GetChallengeProgress() [2/2]

FAccelByteTaskWPtr AccelByte::Api::Challenge::GetChallengeProgress ( FString const & ChallengeCode,
THandler< FAccelByteModelsChallengeProgressResponse > const & OnSuccess,
FErrorHandler const & OnError,
uint64 Offset = 0,
uint64 Limit = 20,
FString const & GoalCode = TEXT(""),
TArray< FString > const & Tags = {} )

Send a request to get current progress for a specific challenge.

Parameters
ChallengeCodeString code for the challenge to check progress for
OnSuccessDelegate executed when request succeeds
OnErrorDelegate executed when request fails
OffsetNumber of goals to skip when returning goal progress list, defaults to 0
LimitNumber of goals to include when returning goal progress list, defaults to 20
GoalCodeString code for the specific challenge goal to get progress for
TagsArray of tag strings used to filter resulting challenge progress list
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ GetChallenges()

FAccelByteTaskWPtr AccelByte::Api::Challenge::GetChallenges ( THandler< FAccelByteModelsGetChallengesResponse > const & OnSuccess,
FErrorHandler const & OnError,
EAccelByteModelsChallengeSortBy SortBy = EAccelByteModelsChallengeSortBy::UPDATED_AT_DESC,
EAccelByteModelsChallengeStatus Status = EAccelByteModelsChallengeStatus::NONE,
uint64 Offset = 0,
uint64 Limit = 20,
FString Keyword = TEXT(""),
TArray< FString > const & Tags = {} )

Send a request to get all challenges.

Parameters
OnSuccessDelegate executed when request succeeds
OnErrorDelegate executed when request fails
SortByDetermines the returned sort order of the challenges, defaults to EAccelByteModelsChallengeSortBy::UPDATED_AT_DESC
StatusDetermines how the returned challenge list should be filtered, defaults to EAccelByteModelsChallengeStatus::NONE
OffsetNumber of challenges to skip when returning the challenge list, defaults to 0
LimitNumber of challenges that should be included in the challenge list, defaults to 20
KeywordString challenge code for the specific challenge list
TagsArray of tag strings used to filter resulting challenge list
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ GetPreviousChallengeProgresses()

FAccelByteTaskWPtr AccelByte::Api::Challenge::GetPreviousChallengeProgresses ( FString const & ChallengeCode,
int32 Index,
THandler< FAccelByteModelsChallengeProgressResponse > const & OnSuccess,
FErrorHandler const & OnError,
FString const & GoalCode = TEXT(""),
uint64 Offset = 0,
uint64 Limit = 20,
TArray< FString > const & Tags = {} )

Send a request to get previous challenge progresses.

Parameters
ChallengeCodeString code for the challenge to check progress for
IndexA positive integer indicating the index of the rotation. The rotations are sorted by their start time in descending order. A value of 0 refers to the current or most recent active rotation. Incrementing the value allows you to reference previous rotations.
OnSuccessDelegate executed when request succeeds
OnErrorDelegate executed when request fails
GoalCodeString code for the specific challenge goal to get progress for
OffsetNumber of goals to skip when returning goal progress list, defaults to 0
LimitNumber of goals to include when returning goal progress list, defaults to 20
TagsArray of tag strings used to filter resulting challenge progress list
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ GetRewards()

FAccelByteTaskWPtr AccelByte::Api::Challenge::GetRewards ( THandler< FAccelByteModelsChallengeGetRewardStatusResponse > const & OnSuccess,
FErrorHandler const & OnError,
EAccelByteModelsChallengeRewardStatus Status = EAccelByteModelsChallengeRewardStatus::NONE,
EAccelByteModelsChallengeSortBy SortBy = EAccelByteModelsChallengeSortBy::UPDATED_AT_DESC,
uint64 Offset = 0,
uint64 Limit = 20 )

Send a request to get status of all challenge rewards.

Parameters
OnSuccessDelegate executed when request succeeds
OnErrorDelegate executed when request fails
StatusDetermines what specific rewards should be included in the response, defaults to EAccelByteModelsChallengeRewardStatus::NONE to show all
SortByDetermines the order in which the rewards in the response are returned
OffsetNumber of rewards to skip when returning reward list, defaults to 0
LimitNumber of rewards to include when returning reward list, defaults to 20
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ ListScheduleByGoal()

FAccelByteTaskWPtr AccelByte::Api::Challenge::ListScheduleByGoal ( FString ChallengeCode,
FString GoalCode,
THandler< FAccelByteModelsChallengeListScheduleByGoalResponse > const & OnSuccess,
FErrorHandler const & OnError,
uint64 Offset = 0,
uint64 Limit = 20 )

Send a request to query the List schedules of given goal in a challenge.

Parameters
ChallengeCodeString code for the challenge to check the schedules for
GoalCodeString code for the specific challenge goal to check the schedules for
OnSuccessDelegate executed when request succeeds
OnErrorDelegate executed when request fails
OffsetNumber of rewards to skip when returning reward list, defaults to 0
LimitNumber of rewards to include when returning reward list, defaults to 20

◆ ListSchedules()

FAccelByteTaskWPtr AccelByte::Api::Challenge::ListSchedules ( FString ChallengeCode,
THandler< FAccelByteModelsChallengeListSchedulesResponse > const & OnSuccess,
FErrorHandler const & OnError,
FDateTime const & DateTime = FDateTime::MinValue(),
uint64 Offset = 0,
uint64 Limit = 20 )

Send a request to query the List schedules of given challenge.

Parameters
ChallengeCodeString code for the challenge to check the schedules for
OnSuccessDelegate executed when request succeeds
OnErrorDelegate executed when request fails
DateTimeOptional parameter to query schedules prior to specific date time
OffsetNumber of rewards to skip when returning reward list, defaults to 0
LimitNumber of rewards to include when returning reward list, defaults to 20