Documentation for Movie API
Project Description
This project was created by Patrick Gannon as part of the Full Stack Web Development program at CareerFoundry.
Project Objective
The objective of the project as stated in the CareerFoundry Achievement 2 Project Brief is:
"To build the server-side component of a “movies” web application. The web application will provide users with access to information about different movies, directors, and genres. Users will be able to sign up, update their personal information, and create a list of their favorite movies."
Essential Requirements
- Return a list of ALL movies to the user
- Return data (description, genre, director, image URL, whether it’s featured or not) about a single movie by title to the user
- Return data about a genre (description) by name/title
- Return data about a director (bio, birth year, death year) by name
- Allow new users to register
- Allow users to update their user info (username, password, email, date of birth)
- Allow users to add a movie to their list of favorites
- Allow users to remove a movie from their list of favorites
- Allow existing users to deregister
Endpoints
Endpoint Number | Request | URL | HTTP Method | Request Body Data Format | Response Body Data Format |
---|---|---|---|---|---|
Return a list of ALL MOVIES to the user. | /Movies | GET | None | A JSON object holding a list of all movies in database. Sample:
|
|
Return data (description, genre, director, image URL, etc.) about a SINGLE MOVIE to the user after searching by movie title. | /Movies/:Title | GET | None | A JSON object holding data (description, genre, director, image URL, whether it’s featured or
not) about a single movie title. Sample:
|
|
Return data about a GENRE (description) after searching by name/title (e.g., "Drama"). | /Movies/Genre/:Name | GET | None | A JSON object holding data (description) about a single genre by name. Sample:
|
|
Return data about a DIRECTOR (bio, birth year, death year) after searching by name. | /Movies/Director/:Name | GET | None | A JSON object holding data (bio, birth year, death year) about a director by name. Sample:
|
|
Add new user / NEW USER REGISTRATION. | /Users | POST | A JSON object holding data about the user. Sample structure:
|
A JSON object holding data about the new user, including the assigned user ID. Sample:
|
|
Allow users to UPDATE their USER INFO (username, email) | /users/:Username | PUT | A JSON object object holding data with the requested updated user info. Sample:
|
A JSON object displaying the updated User information. Sample:
|
|
Allow users to ADD a MOVIE TO their LIST OF FAVORITES | /users/:Username/movies/:MovieID | POST | None. Info retrieved from request parameters. | A JSON object displaying the users' updated Favorite Movies List. Sample:
|
|
Allow users to REMOVE a MOVIE FROM their LIST OF FAVORITES | /users/:Username/movies/:MovieID | DELETE | None. Info retrieved from request parameters. | A JSON object displaying the users' updated Favorite Movies List. Sample:
|
|
Allow existing USER to DEREGISTER | /users/:Username | DELETE | None | A message confirming the user has been successfully removed. |