Skip to content

Instantly share code, notes, and snippets.

@hafbau
Forked from DominicTremblay/rest_exercise.md
Created June 11, 2020 15:49
Show Gist options
  • Save hafbau/661e2f961184cc2fe18714dfddc54cc6 to your computer and use it in GitHub Desktop.
Save hafbau/661e2f961184cc2fe18714dfddc54cc6 to your computer and use it in GitHub Desktop.
Creating routes according to REST

REST exercise

  • You are asked to build an API for a photo app.
  • You need to create the routes according to REST for the following actions:
  1. The end-user wants to see a list of photos

  2. The end-user wants to see a particular photo

  1. The end-user wants to upload a new photo
  1. The end-user wants to update an existing photo
  1. The end-user wants to see a list of user profiles

  2. The end-user wants to see a specific profile

  3. The end-user wants to see a list of the photos for a specific profile

You need to write the route with a verb and a path. You don't need to implement the functionality.

For example, to get a list of users, you just need to write GET '/users'. No need to write the code to get the actual users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment