Skip to content

API Documentation

kdng edited this page Mar 10, 2022 · 9 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.

Watchlists

  • A logged in user can log into their user page

    • GET users/:userId/watchlist/title
  • A logged in user may delete movies off their own watchlist without causing a redirect or refresh

    • DELETE users/:userId/watchlist/title
  • A logged in user can update their watchlist

    • PUT users/:userId/watchlist/title

Reviews

  • Any user can see any reviews of every movie

    • GET movies/:movieId/reviews
  • A logged in user may delete their own reviews without causing a redirect or refresh

    • DELETE users/:userId/reviews/:reviewsId
  • A logged in user can edit their reviews in every movie

    • PUT movies/:movieId/reviews/:reviewsId
  • A logged in user can post a review to any movie

    • POST movies/:movieId/reviews

Movies

  • Any user (logged in or not logged in) can view the list of movies in the homepage

    • GET /movies
  • Any user can view any movie reviews my clicking on the specific movie (however, only logged in users can rate/write movie reviews)

    • GET /movies/:movieId

Clone this wiki locally