Omni One Unreal SDK 1.1.0
The Omni One Unreal SDK allows for games to interface with the Omni platform service.
|
Service for accessing and updating leaderboard information.
The Leaderboard Service is able to retrieve information about this project's leaderboards and their entries, and write new leaderboard entries for the current user.
#include <OmniLeaderboardService.h>
Inherits FOmniPlatformServiceBase.
Public Member Functions | |
bool | Get (const FString &LeaderboardName, const FLeaderboardGetDelegate &InGetCallback) const |
Returns an array of UOmniLeaderboard objects for the provided name. | |
bool | GetEntries (const FString &LeaderboardName, int32 PageSize, int32 PageIndex, EOmniLeaderboardFilterType Filter, EOmniLeaderboardStartAt StartAt, const FLeaderboardGetEntriesDelegate &InGetEntriesCallback) const |
Returns an array of UOmniLeaderboardEntry objects for the provided name. | |
bool | GetEntriesAfterRank (const FString &LeaderboardName, int32 PageSize, int32 PageIndex, uint64 AfterRank, const FLeaderboardGetEntriesDelegate &InGetEntriesAfterRankCallback) const |
Retrieves a paged list of entries from the given leaderboard, starting at a specific rank. | |
bool | GetEntriesByIds (const FString &LeaderboardName, int32 PageSize, int32 PageIndex, EOmniLeaderboardStartAt StartAt, const TArray< FString > &UserIds, const FLeaderboardGetEntriesDelegate &InGetEntriesByIdsCallback) const |
Retrieves a paged list of entries from the given leaderboard, containing only the specified users. | |
bool | WriteEntry (const FString &LeaderboardName, const int64 Score, const FString &ExtraData, const bool bForceUpdate, const FLeaderboardWriteEntryDelegate &InWriteEntryCallback) const |
Writes a new entry to a leaderboard, tied to the current user. | |
bool | WriteEntryWithSupplementaryMetric (const FString &LeaderboardName, const int64 Score, const int64 SupplementaryMetric, const FString &ExtraData, bool bForceUpdate, const FLeaderboardWriteEntryDelegate &InWriteEntryCallback) const |
Writes a new entry to a leaderboard, tied to the current user. | |
bool FOmniLeaderboardService::Get | ( | const FString & | LeaderboardName, |
const FLeaderboardGetDelegate & | InGetCallback | ||
) | const |
Returns an array of UOmniLeaderboard objects for the provided name.
Returns an array of UOmniLeaderboard objects for the provided name and executes callback with the array.
LeaderboardName | Name of the leaderboard. |
InGetCallback | A callback that will be executed when the service has retrieved the information. bool bIsError , const FString& ErrorMessage , TArray<UOmniLeaderboard*>& LeaderboardArray (empty in error cases) are passed as parameters. |
bool FOmniLeaderboardService::GetEntries | ( | const FString & | LeaderboardName, |
int32 | PageSize, | ||
int32 | PageIndex, | ||
EOmniLeaderboardFilterType | Filter, | ||
EOmniLeaderboardStartAt | StartAt, | ||
const FLeaderboardGetEntriesDelegate & | InGetEntriesCallback | ||
) | const |
Returns an array of UOmniLeaderboardEntry objects for the provided name.
Returns an array of UOmniLeaderboardEntry objects for the provided name and executes callback with the array.
LeaderboardName | Name of the leaderboard. |
PageSize | Number of entries per page. |
PageIndex | Index of the page to retrieve. |
Filter | User relation filter. |
StartAt | Start position. |
InGetEntriesCallback | A callback that will be executed when the service has retrieved the information. bool bIsError , const FString& ErrorMessage , TArray<UOmniLeaderboardEntry*>& LeaderboardArray (nullptr in error cases) are passed as parameters. |
bool FOmniLeaderboardService::GetEntriesAfterRank | ( | const FString & | LeaderboardName, |
int32 | PageSize, | ||
int32 | PageIndex, | ||
uint64 | AfterRank, | ||
const FLeaderboardGetEntriesDelegate & | InGetEntriesAfterRankCallback | ||
) | const |
Retrieves a paged list of entries from the given leaderboard, starting at a specific rank.
Returns an array of UOmniLeaderboardEntry objects for the provided parameters and executes callback with the array.
LeaderboardName | Name of the leaderboard. |
PageSize | Number of entries per page. |
PageIndex | Index of the page to retrieve. |
AfterRank | The rank where the list will start. |
InGetEntriesAfterRankCallback | A callback that will be executed when the service has retrieved the information. bool bIsError , const FString& ErrorMessage , TArray<UOmniLeaderboardEntry*>& LeaderboardArray (nullptr in error cases) are passed as parameters. |
bool FOmniLeaderboardService::GetEntriesByIds | ( | const FString & | LeaderboardName, |
int32 | PageSize, | ||
int32 | PageIndex, | ||
EOmniLeaderboardStartAt | StartAt, | ||
const TArray< FString > & | UserIds, | ||
const FLeaderboardGetEntriesDelegate & | InGetEntriesByIdsCallback | ||
) | const |
Retrieves a paged list of entries from the given leaderboard, containing only the specified users.
Returns an array of UOmniLeaderboardEntry objects for the provided parameters and executes callback with the array.
LeaderboardName | Name of the leaderboard. |
PageSize | Number of entries per page. |
PageIndex | Index of the page to retrieve. |
StartAt | Defines the starting point of the first page of the list. |
UserIds | The list of user IDs to retrieve entries for. |
InGetEntriesByIdsCallback | A callback that will be executed when the service has retrieved the information. bool bIsError , const FString& ErrorMessage , TArray<UOmniLeaderboardEntry*>& LeaderboardArray (nullptr in error cases) are passed as parameters. |
bool FOmniLeaderboardService::WriteEntry | ( | const FString & | LeaderboardName, |
const int64 | Score, | ||
const FString & | ExtraData, | ||
const bool | bForceUpdate, | ||
const FLeaderboardWriteEntryDelegate & | InWriteEntryCallback | ||
) | const |
Writes a new entry to a leaderboard, tied to the current user.
LeaderboardName | The API Name of the desired leaderboard. |
Score | The score to associate with this entry. |
ExtraData | Any additional required information. |
bForceUpdate | If true, will update the user's score even if the new score is lower than the previous value. |
InWriteEntryCallback | A callback that will be executed when the service has retrieved the information. bool bIsError , const FString& ErrorMessage , bool bWasUpdated are passed as parameters. |
bool FOmniLeaderboardService::WriteEntryWithSupplementaryMetric | ( | const FString & | LeaderboardName, |
const int64 | Score, | ||
const int64 | SupplementaryMetric, | ||
const FString & | ExtraData, | ||
bool | bForceUpdate, | ||
const FLeaderboardWriteEntryDelegate & | InWriteEntryCallback | ||
) | const |
Writes a new entry to a leaderboard, tied to the current user.
LeaderboardName | The API Name of the desired leaderboard. |
Score | The score to associate with this entry. |
SupplementaryMetric | An additional value used as a tie-breaker. |
ExtraData | Any additional required information. |
bForceUpdate | If true, will update the user's score even if the new score is lower than the previous value. |
InWriteEntryCallback | A callback that will be executed when the service has retrieved the information. bool bIsError , const FString& ErrorMessage , bool bWasUpdated are passed as parameters. |