[SUGGESTION] Cleaning up leaderboards endpoint #369
Clemintina
started this conversation in
Ideas
Replies: 1 comment
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Issue:
Leaderboard's response design
Request:
A request to clean up the leaderboards endpoint by using objects instead of arrays per game.
Reasoning:
Currently the api for leaderboards uses arrays, this makes it harder for us to process the response without making complex loops. Not only would this be convenient to other developers but it would also make it easier to process the response efficiently and help us write cleaner, high performance code.
Another reason to use objects over arrays is flexibility. By using objects, the response can contain more data without conflicting with existing code allowing backwards compatibility in the future.
An example of us processing the response right now would be something like this:
leaderboards.BEDWARS[4].leaders
when it could be cleaner and be something like
leaderboards.BEDWARS.weekly_overall.leaders
Thank you for reading!
Beta Was this translation helpful? Give feedback.
All reactions