Skip to content

API Documentation

Tran Le edited this page Apr 26, 2021 · 6 revisions

API Routes

This web app uses the following API routes to dynamically update the page to create a single-page-app-like feel for the user for specific features.

Users

  • A user can sign up for an account.
    • POST /api/users

Session

  • A user can log in, log out, or stay logged in.
    • GET /api/session
    • POST /api/session
    • DELETE /api/session

Photos

  • A logged in user may view photos, add, edit, or delete a photo uploaded on their account.
    • GET /api/photos
    • GET /api/photos/:id
    • POST /api/photos
    • PUT /api/photos/:id
    • DELETE /api/photos/:id

Albums

  • A logged in user may view, add, edit, or delete a photo album.
    • GET /api/users/:id/albums
    • GET /api/albums/:id
    • POST /api/users/:id/albums
    • PUT /api/albums/:id
    • DELETE /api/albums/:id

Comments

  • A logged in user may add, edit, or delete a comment they made on a photo.
    • POST /api/photos/:id/comment
    • PUT /api/comment/:id
    • DELETE /api/comment/:id
Clone this wiki locally