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

Leaderboard API to obtain player's ranking in a namespace. More...

#include <AccelByteLeaderboardApi.h>

Inheritance diagram for AccelByte::Api::Leaderboard:

Public Member Functions

 Leaderboard (Credentials const &InCredentialsRef, Settings const &InSettingsRef, FHttpRetrySchedulerBase &InHttpRef, TSharedPtr< AccelByte::FApiClient, ESPMode::ThreadSafe > const &InApiClient=nullptr)
 Leaderboard (Credentials const &InCredentialsRef, Settings const &InSettingsRef, FHttpRetrySchedulerBase &InHttpRef, FAccelBytePlatformPtr const &InAccelBytePlatform)
void GetRankings (FString const &LeaderboardCode, EAccelByteLeaderboardTimeFrame const &TimeFrame, uint32 Offset, uint32 Limit, THandler< FAccelByteModelsLeaderboardRankingResult > const &OnSuccess, FErrorHandler const &OnError)
 Get leaderboard rankings in a specified timeframe.
void GetUserRanking (FString const &UserId, FString const &LeaderboardCode, THandler< FAccelByteModelsUserRankingData > const &OnSuccess, FErrorHandler const &OnError)
 Get user's ranking from leaderboard.
void GetLeaderboards (uint32 Offset, uint32 Limit, THandler< FAccelByteModelsPaginatedLeaderboardData > const &OnSuccess, FErrorHandler const &OnError)
 List all leaderboards in the current namespace.
void GetRankingByCycle (FString const &LeaderboardCode, FString const &CycleId, uint32 Offset, uint32 Limit, THandler< FAccelByteModelsLeaderboardRankingResultV3 > const &OnSuccess, FErrorHandler const &OnError)
 Get the list of user ranking data in a leaderboard in a specific cycle.
void GetLeaderboardsV3 (THandler< FAccelByteModelsPaginatedLeaderboardData > const &OnSuccess, FErrorHandler const &OnError, uint32 Limit=20, uint32 Offset=0)
 List all leaderboards in the current namespace.
void GetLeaderboardV3 (FString const &LeaderboardCode, THandler< FAccelByteModelsBaseLeaderboardData > const &OnSuccess, FErrorHandler const &OnError)
 Retrieve Leaderboard data for specific LeaderboardCode.
void GetRankingsV3 (FString const &LeaderboardCode, uint32 Offset, uint32 Limit, THandler< FAccelByteModelsLeaderboardRankingResultV3 > const &OnSuccess, FErrorHandler const &OnError)
 Get the list of all time user ranking data in a leaderboard.
void GetRankingByCycleV3 (FString const &LeaderboardCode, FString const &CycleId, THandler< FAccelByteModelsLeaderboardRankingResultV3 > const &OnSuccess, FErrorHandler const &OnError, uint32 Limit=20, uint32 Offset=0)
 Get the list of user ranking data in a leaderboard in a specific cycle.
void GetUserRankingV3 (FString const &UserId, FString const &LeaderboardCode, THandler< FAccelByteModelsUserRankingDataV3 > OnSuccess, FErrorHandler const &OnError)
 Get all time and cycles user ranking data in a leaderboard.
void GetBulkUserRankingV3 (TArray< FString > const &UserIds, FString const &LeaderboardCode, THandler< FAccelByteModelsBulkUserRankingDataV3 > OnSuccess, FErrorHandler const &OnError)
 Retrieve bulk user ranking data for all time periods and cycles in a leaderboard.
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

Leaderboard API to obtain player's ranking in a namespace.

Member Function Documentation

◆ GetBulkUserRankingV3()

void AccelByte::Api::Leaderboard::GetBulkUserRankingV3 ( TArray< FString > const & UserIds,
FString const & LeaderboardCode,
THandler< FAccelByteModelsBulkUserRankingDataV3 > OnSuccess,
FErrorHandler const & OnError )

Retrieve bulk user ranking data for all time periods and cycles in a leaderboard.

Parameters
UserIdsList of UserIds.
LeaderboardCodeThe leaderboard code
OnSuccessThis will be called when the operation succeeded. The result is an FAccelByteModelsBulkUserRankingDataV3
OnErrorThis will be called when the operation failed

◆ GetLeaderboards()

void AccelByte::Api::Leaderboard::GetLeaderboards ( uint32 Offset,
uint32 Limit,
THandler< FAccelByteModelsPaginatedLeaderboardData > const & OnSuccess,
FErrorHandler const & OnError )

List all leaderboards in the current namespace.

Parameters
OffsetThe offset of leaderboard data result
LimitThe limit of leaderboard data result
OnSuccessThis will be called when the operation succeeded. The result is an FAccelByteModelsPaginatedLeaderboardData
OnErrorThis will be called when the operation failed.

◆ GetLeaderboardsV3()

void AccelByte::Api::Leaderboard::GetLeaderboardsV3 ( THandler< FAccelByteModelsPaginatedLeaderboardData > const & OnSuccess,
FErrorHandler const & OnError,
uint32 Limit = 20,
uint32 Offset = 0 )

List all leaderboards in the current namespace.

Parameters
OnSuccessThis will be called when the operation succeeded. The result is an FAccelByteModelsPaginatedLeaderboardData
OnErrorThis will be called when the operation failed.
LimitThe limit of leaderboard data result
OffsetThe offset of leaderboard data result

◆ GetLeaderboardV3()

void AccelByte::Api::Leaderboard::GetLeaderboardV3 ( FString const & LeaderboardCode,
THandler< FAccelByteModelsBaseLeaderboardData > const & OnSuccess,
FErrorHandler const & OnError )

Retrieve Leaderboard data for specific LeaderboardCode.

Parameters
LeaderboardCodespecified Leaderboard code to query
OnSuccessThis will be called when the operation succeeded. The result is an FAccelByteModelsPaginatedLeaderboardData
OnErrorThis will be called when the operation failed.

◆ GetRankingByCycle()

void AccelByte::Api::Leaderboard::GetRankingByCycle ( FString const & LeaderboardCode,
FString const & CycleId,
uint32 Offset,
uint32 Limit,
THandler< FAccelByteModelsLeaderboardRankingResultV3 > const & OnSuccess,
FErrorHandler const & OnError )

Get the list of user ranking data in a leaderboard in a specific cycle.

Parameters
LeaderboardCode
CycleId
OffsetThe offset of leaderboard data result
LimitThe limit of leaderboard data result
OnSuccessThis will be called when the operation succeeded. The result is an FAccelByteModelsLeaderboardRankingResultV3
OnErrorThis will be called when the operation failed

◆ GetRankingByCycleV3()

void AccelByte::Api::Leaderboard::GetRankingByCycleV3 ( FString const & LeaderboardCode,
FString const & CycleId,
THandler< FAccelByteModelsLeaderboardRankingResultV3 > const & OnSuccess,
FErrorHandler const & OnError,
uint32 Limit = 20,
uint32 Offset = 0 )

Get the list of user ranking data in a leaderboard in a specific cycle.

Parameters
LeaderboardCode
CycleId
OnSuccessThis will be called when the operation succeeded. The result is an FAccelByteModelsLeaderboardRankingResultV3
OnErrorThis will be called when the operation failed
LimitThe limit of leaderboard data result
OffsetThe offset of leaderboard data result

◆ GetRankings()

void AccelByte::Api::Leaderboard::GetRankings ( FString const & LeaderboardCode,
EAccelByteLeaderboardTimeFrame const & TimeFrame,
uint32 Offset,
uint32 Limit,
THandler< FAccelByteModelsLeaderboardRankingResult > const & OnSuccess,
FErrorHandler const & OnError )

Get leaderboard rankings in a specified timeframe.

Parameters
LeaderboardCodeSpecify leaderboard code to get from the leaderboard.
TimeFrameSpecify the time frame of leaderboard.
OffsetStarting index of leaderboard rank. First index is 0.
LimitRanking displayed for each page.
OnSuccessThis will be called when the operation succeeded. The result is an FAccelByteModelsLeaderboardRankingResult.
OnErrorThis will be called when the operation failed.

◆ GetRankingsV3()

void AccelByte::Api::Leaderboard::GetRankingsV3 ( FString const & LeaderboardCode,
uint32 Offset,
uint32 Limit,
THandler< FAccelByteModelsLeaderboardRankingResultV3 > const & OnSuccess,
FErrorHandler const & OnError )

Get the list of all time user ranking data in a leaderboard.

Parameters
LeaderboardCodeThe leaderboard code
OffsetThe offset of leaderboard data result
LimitThe limit of leaderboard data result
OnSuccessThis will be called when the operation succeeded. The result is an FAccelByteModelsLeaderboardRankingResultV3
OnErrorThis will be called when the operation failed

◆ GetUserRanking()

void AccelByte::Api::Leaderboard::GetUserRanking ( FString const & UserId,
FString const & LeaderboardCode,
THandler< FAccelByteModelsUserRankingData > const & OnSuccess,
FErrorHandler const & OnError )

Get user's ranking from leaderboard.

Parameters
UserIdSpecify user ID to get from the leaderboard ranking list.
LeaderboardCodeSpecify leaderboard code to get from the leaderboard.
OnSuccessThis will be called when the operation succeeded. The result is an FAccelByteModelsUserRankingData.
OnErrorThis will be called when the operation failed.

◆ GetUserRankingV3()

void AccelByte::Api::Leaderboard::GetUserRankingV3 ( FString const & UserId,
FString const & LeaderboardCode,
THandler< FAccelByteModelsUserRankingDataV3 > OnSuccess,
FErrorHandler const & OnError )

Get all time and cycles user ranking data in a leaderboard.

Parameters
UserId
LeaderboardCode
OnSuccessThis will be called when the operation succeeded. The result is an FAccelByteModelsUserRankingDataV3
OnErrorThis will be called when the operation failed