|Giuseppe Guerra 32c0dae40e||il y a 1 mois|
|.vscode||il y a 3 mois|
|app||il y a 1 mois|
|beatmapget||il y a 3 ans|
|common||il y a 10 mois|
|limit||il y a 3 ans|
|.dockerignore||il y a 1 mois|
|.gitignore||il y a 3 mois|
|LICENSE||il y a 3 ans|
|README.md||il y a 2 ans|
|go.mod||il y a 1 mois|
|go.sum||il y a 1 mois|
|main.go||il y a 2 ans|
|startuato_linux.go||il y a 3 ans|
|startuato_windows.go||il y a 3 ans|
This is the source code for Ripple's API.
The API is crammed with terrible design. First of all, it is not RESTful, and as you'll come to learn, designing an API in a RESTful manner is good because it helps to create consistent design (across your API and other APIs). It also quite simplifies many other things:
/users?id=1009. It's much more useful to have these in the URL path directly (
/users/1009) for a number of reasons:
/users/scores?id=1009will require a check to see if an ID is present.
/users/:id/scoresdoesn't really need a check, because
codeparameter), so the user can likely reuse other parts for error handling that they already use for other http requests.
The not-making-it-RESTful was the biggest sin of the API. In itself, the API was a step into the right direction (it is MUCH better than the official osu! API), but nowhere close to how an API actually is, ideally. If you are building an API, I won't recommend you a book, but instead I will recommend you to see what GitHub does, as they will have probably faced most problems that you have, and provided an answer already. If you're unsure, check other APIs: Discord, Slack, Twitter, Stripe, to name a few.