Updated Leaderboard API (markdown)

Tom Bloor 2017-06-13 23:14:15 +01:00
parent df3899421e
commit 5706e65bdf

@ -21,8 +21,8 @@ Where type is one of:
* `weekly_count` * `weekly_count`
* `monthly_total` * `monthly_total`
* `monthly_count` * `monthly_count`
* `global_total` * `all_time_total`
* `global_count` * `all_time_count`
### Response JSON ### Response JSON
@ -37,7 +37,8 @@ Response code of `200 OK`
{ {
display_name : <User Display Name>, display_name : <User Display Name>,
value : <leaderboard value>, value : <leaderboard value>,
trend : <trend> trend : <trend>,
position : <position>
}, },
... ...
], ],
@ -47,11 +48,11 @@ Response code of `200 OK`
Where trend is: Where trend is:
* `1` : Climbing the Leaderboard * `1` : Descending the Leaderboard (approaching last)
* `0` : No change in Leaderboard position * `0` : No change in Leaderboard position
* `-1` : Descending the Leaderboard * `-1` : Ascending the Leaderboard (approaching first)
And `user_position` is the place of the user in the leaderboard - *zero indexed*! And `user_position` is the place of the user in the leaderboard - a result of `0` means they have no position.
#### Failure #### Failure