class Leaderboards
Leaderboards
()
|
Signature
constructor() Returns
Leaderboards
|
get
(
coroutineScope
, leaderboardName
)
|
Retrieves detailed information for a single leaderboard with a specified name, returning an array of Leaderboard.
Signature
fun get(coroutineScope: CoroutineScope, leaderboardName: String): PagedResults<Leaderboard> Parameters
coroutineScope:
CoroutineScope
leaderboardName:
String
Returns
PagedResults
|
getEntries
(
coroutineScope
, leaderboardName
, limit
, filter
, startAt
)
|
Retrieves a list of leaderboard entries for a specified leaderboardName, with options to filter and limit the number of results returned.
Signature
fun getEntries(coroutineScope: CoroutineScope, leaderboardName: String, limit: Int, filter: LeaderboardFilterType, startAt: LeaderboardStartAt): PagedResults<LeaderboardEntry> Parameters
coroutineScope:
CoroutineScope
leaderboardName:
String
limit:
Int
filter:
LeaderboardFilterType
startAt:
LeaderboardStartAt
Returns
PagedResults
|
getEntriesAfterRank
(
coroutineScope
, leaderboardName
, limit
, afterRank
)
|
Retrieves a block of leaderboard entries starting from a specific rank.
Signature
fun getEntriesAfterRank(coroutineScope: CoroutineScope, leaderboardName: String, limit: Int, afterRank: Long): PagedResults<LeaderboardEntry> Parameters
coroutineScope:
CoroutineScope
leaderboardName:
String
limit:
Int
afterRank:
Long
Returns
PagedResults
|
getEntriesByIds
(
coroutineScope
, leaderboardName
, limit
, startAt
, userIds
)
|
Retrieves a block of leaderboard entries that match the specified user IDs. Only entries corresponding to the provided user IDs will be returned.
Signature
fun getEntriesByIds(coroutineScope: CoroutineScope, leaderboardName: String, limit: Int, startAt: LeaderboardStartAt, userIds: List<String>): PagedResults<LeaderboardEntry> Parameters
coroutineScope:
CoroutineScope
leaderboardName:
String
limit:
Int
startAt:
LeaderboardStartAt
userIds:
List
Returns
PagedResults
|
writeEntry
(
leaderboardName
, score
, extraData
, forceUpdate
)
|
Writes a single entry to the leaderboard, returning LeaderboardUpdateStatus indicating whether the update was successful and providing the updated challenge IDs.
Signature
suspend fun writeEntry(leaderboardName: String, score: Long, extraData: ByteArray? = null, forceUpdate: Boolean? = null): LeaderboardUpdateStatus Parameters
leaderboardName:
String
score:
Long
extraData:
ByteArray?
forceUpdate:
Boolean?
Returns
LeaderboardUpdateStatus
|
writeEntryWithSupplementaryMetric
(
leaderboardName
, score
, supplementaryMetric
, extraData
, forceUpdate
)
|
Writes a single entry to a leaderboard which can include supplementary metrics, returning LeaderboardUpdateStatus indicating whether the update was successful and providing the updated challenge IDs.
Signature
suspend fun writeEntryWithSupplementaryMetric(leaderboardName: String, score: Long, supplementaryMetric: Long, extraData: ByteArray? = null, forceUpdate: Boolean? = null): LeaderboardUpdateStatus Parameters
leaderboardName:
String
score:
Long
supplementaryMetric:
Long
extraData:
ByteArray?
forceUpdate:
Boolean?
Returns
LeaderboardUpdateStatus
|