Get points leaderboard
Viewers ranked by loyalty points or watch time, with each balance.
GET https://cotlet.dev/api/v1/streamelements/points-leaderboard
read
Returns the leaderboard for your loyalty currency. View is Current (points from watching and chat mini-games), All-Time (points from watch time only) or Watch Time (minutes watched). Pass username to look up one viewer, for example before adjust_points. Needs the Loyalty System.
Parameters
| Name | Type | Description |
|---|---|---|
| view enum | enum | current, all_time or watch_time. Default: current. |
| username string | string | Only this viewer. |
| limit integer | integer | 1 to 100. Default: 25. |
| cursor string | string | Next page cursor from the previous call. |
Request
curl https://cotlet.dev/api/v1/streamelements/points-leaderboard \
-H "Authorization: Bearer $COTLET_API_KEY" result = client.call("streamelements", "get_points_leaderboard") const result = await cotlet.call('streamelements', 'get_points_leaderboard'); cotlet call streamelements get_points_leaderboard Example response
{
"view": "current",
"entries": [
{
"rank": 1,
"username": "mika_r",
"points": 1840,
"watch_time_minutes": 5120
},
{
"rank": 2,
"username": "luka_dev",
"points": 775,
"watch_time_minutes": 2980
}
],
"next_cursor": null
}