Skip to content

BackEnd Routes

Sadman255 edited this page Dec 17, 2019 · 3 revisions

HTML

. GET / StaticPagesController#root

### API EndPoints

1- users:

  • GET /api/users/ - returns all users' information
  • GET /api/users/id - returns a specific user's information
  • POST /api/users - sign up

2- session:

  • POST /api/session - log in
  • DELETE /api/session - log out

3- images:

  • GET /api/images/id -returns all images from the user the current user is following
  • GET /api/users/:id/images/id -returns all images from a specific user
  • GET /api/images/id -returns a specific image's information.
  • POST /api/images/ -posts an image
  • PATCH /api/images/id -edits a specific image
  • DELETE /api/images/id -deletes a specific image

4- comments:

  • POST /api/comments -creates a comment
  • PATCH /api/comments/id -edits a comment
  • DELETE /api/comments/id -deletes a comment

5- likes:

  • POST /api/likes/id -likes an image
  • DELETE /api/likes/id -dislikes an image

6- follows:

  • POST /api/follows/id -follows an user
  • DELETE /api/follows/id -unfollows an user

Clone this wiki locally