This is the documentation of the Leaderboard API service we created for this capstone project.
https://us-central1-js-capstone-backend.cloudfunctions.net/api/
<aside> ⚠️ Common mistake: using the wrong format of your request. So if you get a 404 Not Found Error, double-check if you are using correct URL and action. For example: 'curl https://us-central1-js-capstone-backend.cloudfunctions.net/api/games' won't work as /games endpoint does not allow for GET action.
</aside>
/games/
Allowed actions:
Mandatory parameters for POST action:
Parameters example for POST action (sent in the body of the request in JSON format):
{
"name": "My cool new game"
}
Return value: unique identifier for the game
{
"result": "Game with ID: **Zl4d7IVkemOTTVg2fUdz** added."
}
/games/:id/scores/
URL parameters: