getLeaderboard

suspend fun getLeaderboard(count: Int = 10, period: BitsLeaderboardPeriod = BitsLeaderboardPeriod.ALL, startedAt: String? = null, userId: String? = null): List<BitsLeaderEntry>

Twitch API: Get Bits Leaderboard

Gets the Bits leaderboard for the authenticated broadcaster.

Return

a list of leaderboard leaders, returned in rank order by how much they've cheered. The list is empty if nobody has cheered bits.

Parameters

count

the number of results to return. The minimum count is 1 and the maximum is 100. The default is 10.

period

the time period over which data is aggregated (uses the PST time zone). Possible values are: day, week, month, year, all. The default is all.

startedAt

the start date, in RFC3339 format, used for determining the aggregation period. Specify this parameter only if you specify the period parameter. The start date is ignored if period is all.

userId

an ID that identifies a user that cheered bits in the channel. If count is greater than 1, the response may include users ranked above and below the specified user. To get the leaderboard's top leaders, don't specify a user ID.