PicoLeaderboardsInterface class.
More...
#include <Pico_Leaderboards.h>
|
| bool | Get (const FString &LeaderboardName, FGet InGetDelegate) |
| | Gets a specified leaderboard. More...
|
| |
| bool | GetEntries (const FString &LeaderboardName, int PageIdx, int PageSize, ppfLeaderboardFilterType Filter, ppfLeaderboardStartAt StartAt, FGetEntries InGetEntriesDelegate) |
| | Gets a list of leaderboard entries. More...
|
| |
| bool | GetEntriesAfterRank (const FString &LeaderboardName, int PageIdx, int PageSize, unsigned long long AfterRank, FGetEntriesAfterRank InGetEntriesAfterRankDelegate) |
| | Gets the leaderboard entries after a specified ranking. More...
|
| |
| bool | GetEntriesByIds (const FString &LeaderboardName, int PageIdx, int PageSize, ppfLeaderboardStartAt StartAt, const TArray< FString > &UserIDs, FGetEntriesByIds InGetEntriesByIdsDelegate) |
| | Gets the leaderboard entries for a specified user. More...
|
| |
| bool | WriteEntry (const FString &LeaderboardName, const int64 &Score, const FString &ExtraData, bool ForceUpdate, FWriteEntry InWriteEntryDelegate) |
| | Writes a user's score to the leaderboard. More...
|
| |
| bool | WriteEntryWithSupplementaryMetric (const FString &LeaderboardName, const int64 &Score, const int64 &SupplementaryMetric, const FString &ExtraData, bool ForceUpdate, FWriteEntryWithSupplementaryMetric InWriteEntryWithSupplementaryMetricDelegate) |
| | Adds custom contents when writing a user's score to a leaderboard. More...
|
| |
PicoLeaderboardsInterface class.
◆ Get()
| bool Get |
( |
const FString & |
LeaderboardName, |
|
|
FGet |
InGetDelegate |
|
) |
| |
Gets a specified leaderboard.
- Parameters
-
| leaderboardName | Leaderboard name. |
| InGetDelegate | Will be executed when the request has been completed. Delegate will contain the requested object class (bool, bIsError, const FString&, ErrorMessage, UPico_LeaderboardArray *, LeaderboardList). |
- Returns
- Bool:
-
true: success
-
false: failure
◆ GetEntries()
| bool GetEntries |
( |
const FString & |
LeaderboardName, |
|
|
int |
PageIdx, |
|
|
int |
PageSize, |
|
|
ppfLeaderboardFilterType |
Filter, |
|
|
ppfLeaderboardStartAt |
StartAt, |
|
|
FGetEntries |
InGetEntriesDelegate |
|
) |
| |
Gets a list of leaderboard entries.
- Parameters
-
| leaderboardName | Leaderboard name. |
| pageSize | The number of entries to return on each page. |
| pageIdx | Defines which page of entries to return. The value = (The target page No.)-1. For example, if you want to get the first page of entries, pass 0; if you want to get the second page of entries, pass 1. |
| filter | Restricts the scope of entries to return:
NONE: returns all entries of the specified leaderboard
FRIENDS: returns the entries of the friends of the current logged-in user
USER_IDS(do not pass this value): returns the entries of specified users
|
| startAt | Defines where to start returning challenge entries, the enumerations are:
0: Top (return entries from top 1)
1: CenteredOnViewer (place the current logged-in user's entry in the middle of the list on the first page. For example, if the total number of entries is 10, pageSize is set to 5, and the user's rank is top 5, the ranks displayed on the first page will be top 3, 4, 5, 6, and 7. Top 1 and 2 will not be displayed, and top 8, 9, and 10 will be displayed on the second page)
2: CenteredOnViewerOrTop (place the current logged-in user's entry on the top of the list on the first page. For example, if the total number of entries is 10, pageSize is set to 5, and the user's rank is top 5, the ranks displayed on the first page will be top 5, 6, 7, 8, and 9. Top 1, 2, 3, and 4 will not be displayed, and top 10 will be displayed on the second page)
|
| InGetEntriesDelegate | Will be executed when the request has been completed. Delegate will contain the requested object class (bool, bIsError, const FString&, ErrorMessage, UPico_LeaderboardEntryArray *, LeaderboardEntryList). |
- Returns
- Bool:
-
true: success
-
false: failure
◆ GetEntriesAfterRank()
| bool GetEntriesAfterRank |
( |
const FString & |
LeaderboardName, |
|
|
int |
PageIdx, |
|
|
int |
PageSize, |
|
|
unsigned long long |
AfterRank, |
|
|
FGetEntriesAfterRank |
InGetEntriesAfterRankDelegate |
|
) |
| |
Gets the leaderboard entries after a specified ranking.
- Parameters
-
| LeaderboardName | Leaderboard name. |
| PageIdx | Defines which page of entries to return. The value = (The target page No.)-1. For example, if you want to get the first page of entries, pass 0; if you want to get the second page of entries, pass 1. |
| PageSize | The number of entries to return on each page. |
| AfterRank | Defines after which rank to return entries. |
| InGetEntriesAfterRankDelegate | Will be executed when the request has been completed. Delegate will contain the requested object class (bool, bIsError, const FString&, ErrorMessage, UPico_LeaderboardEntryArray *, LeaderboardEntryList). |
- Returns
- Bool:
-
true: success
-
false: failure
◆ GetEntriesByIds()
| bool GetEntriesByIds |
( |
const FString & |
LeaderboardName, |
|
|
int |
PageIdx, |
|
|
int |
PageSize, |
|
|
ppfLeaderboardStartAt |
StartAt, |
|
|
const TArray< FString > & |
UserIDs, |
|
|
FGetEntriesByIds |
InGetEntriesByIdsDelegate |
|
) |
| |
Gets the leaderboard entries for a specified user.
- Parameters
-
| leaderboardName | Leaderboard name. |
| pageSize | The number of entries to return on each page. |
| pageIdx | Defines which page of entries to return. The value = (The target page No.)-1. For example, if you want to get the first page of entries, pass 0; if you want to get the second page of entries, pass 1. |
| startAt | Defines where to start returning challenge entries, the enumerations are:
0: Top (return entries from top 1)
1: CenteredOnViewer (place the current logged-in user's entry in the middle of the list on the first page. For example, if the total number of entries is 10, pageSize is set to 5, and the user's rank is top 5, the ranks displayed on the first page will be top 3, 4, 5, 6, and 7. Top 1 and 2 will not be displayed, and top 8, 9, and 10 will be displayed on the second page)
2: CenteredOnViewerOrTop (place the current logged-in user's entry on the top of the list on the first page. For example, if the total number of entries is 10, pageSize is set to 5, and the user's rank is top 5, the ranks displayed on the first page will be top 5, 6, 7, 8, and 9. Top 1, 2, 3, and 4 will not be displayed, and top 10 will be displayed on the second page)
|
| userIDs | User ID. |
| InGetEntriesByIdsDelegate | Will be executed when the request has been completed. Delegate will contain the requested object class (bool, bIsError, const FString&, ErrorMessage, UPico_LeaderboardEntryArray *, LeaderboardEntryList). |
- Returns
- Bool:
-
true: success
-
false: failure
◆ WriteEntry()
| bool WriteEntry |
( |
const FString & |
LeaderboardName, |
|
|
const int64 & |
Score, |
|
|
const FString & |
ExtraData, |
|
|
bool |
ForceUpdate, |
|
|
FWriteEntry |
InWriteEntryDelegate |
|
) |
| |
Writes a user's score to the leaderboard.
- Parameters
-
| leaderboardName | Leaderboard name. |
| score | The user's score. |
| extraData | Custom extension fields that can be used to record key information when writing the user's score. |
| forceUpdate | Whether to force a leaderboard update:
true: make a force update
false: no force update - Parameters
-
| InWriteEntryDelegate | Will be executed when the request has been completed. Delegate will contain the requested object class (bool, bIsError, const FString&, ErrorMessage, bool, WriteResult). |
- Returns
- Bool:
-
true: success
-
false: failure
|
◆ WriteEntryWithSupplementaryMetric()
| bool WriteEntryWithSupplementaryMetric |
( |
const FString & |
LeaderboardName, |
|
|
const int64 & |
Score, |
|
|
const int64 & |
SupplementaryMetric, |
|
|
const FString & |
ExtraData, |
|
|
bool |
ForceUpdate, |
|
|
FWriteEntryWithSupplementaryMetric |
InWriteEntryWithSupplementaryMetricDelegate |
|
) |
| |
Adds custom contents when writing a user's score to a leaderboard.
- Parameters
-
| leaderboardName | Leaderboard name. |
| score | The user's score. |
| supplementaryMetric | Custom contents, such as a video. |
| extraData | Custom extension fields that can be used to record key information when writing the custom contents. |
| forceUpdate | Whether to force a leaderboard update:
true: make a force update
false: no force update - Parameters
-
| InWriteEntryWithSupplementaryMetricDelegate | Will be executed when the request has been completed. Delegate will contain the requested object class (bool, bIsError, const FString&, ErrorMessage, bool, WriteResult). |
- Returns
- Bool:
-
true: success
-
false: failure
|