Closed TimJentzsch closed 2 years ago
Add a volunteer/leaderboard endpoint to get the data necessary for the /leaderboard command (GrafeasGroup/buttercup#18).
volunteer/leaderboard
/leaderboard
For reference, the bot output will look something like this:
The endpoint could have a format like this:
{ "top": [ ... ], "above": [ ... ], "user": { ... }, "below": [ ... ] }
top
user
above
below
Each user entry should have a form similar to this:
{ "id": 4034, "username": "Tim3303", "rank": 16, "gamma": 1248 }
Add a
volunteer/leaderboard
endpoint to get the data necessary for the/leaderboard
command (GrafeasGroup/buttercup#18).For reference, the bot output will look something like this:
The endpoint could have a format like this:
top
field contains a list of users at the top of the leaderboard. The amount of users shown there can be controlled by thetop
query parameter.user
field contains the user that was queried for via theuser
parameter.above
field contains a list of users that are higher on the leaderboard than the user. The amount can be controlled by theabove
query parameter.below
field contains a list of users that are lower on the leaderboard than the user. The amount can be controlled by thebelow
query parameter.Each user entry should have a form similar to this: