myFlix Documentation

Objective:

To build the server-side component of a "movies" web application. This 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.

Request URL HTTP Method Request Body Data Format Response Body Data Format
Get a list of movies /movies GET None A JSON object holding data about all the movies
Get data about a single movie by title /movies/[Title] GET None A JSON object holding data about a single movie, containing ID, title, description, genre, director, image URL, and whether it is featured. Example:
{
movieID: "5fc2d9bdd1685fe25acf861b"
Title: "A Quiet Place",
Description: "In a post-apocalyptic world, a family is forced to live in silence while hiding from monsters with ultra-sensitive hearing.",
Genre: {
Name: "Sci-Fi",
Description: "Science fiction is a genre of speculative fiction that typically deals with imaginative and futuristic concepts such as advanced science and technology, space exploration, time travel, parallel universes, and extraterrestrial life.",
},
Director: {
Name: "John Krasinski",
Bio: "John Burke Krasinski is an American actor and filmmaker. He is the recipient of a number of accolades, including four Primetime Emmy Award nominations and two Screen Actors Guild Awards.",
Birth: "1979",
Death: ""
},
Get information about a genre by name /movies/genre/[Name] GET None A JSON object holding the data about the genre that was entered. Example:
{
Name: "Sci-Fi",
Description: "Science fiction is a genre of speculative fiction that typically deals with imaginative and futuristic concepts such as advanced science and technology, space exploration, time travel, parallel universes, and extraterrestrial life."
}
Get information about a director by name /movies/director/[Name] GET None A JSON object holding the data about the director that was enetered. Example:
{
Name: "Steven Spielberg",
Bio: "Steven Allan Spielberg is an American film director, producer, and screenwriter. He is considered one of the founding pioneers of the New Hollywood era and one of the most popular directors and producers in film history. Spielberg started in Hollywood directing television and several minor theatrical releases.",
Birth: "1946",
Death: ""
}
Allow new users to register /users POST A JSON object holding account information for the user. Example:
{
Username: "oohgaryc",
Email: "garysbestemail@gmail.com",
Password: "pincollector007",
Birthday: new Date("1980-11-18"),
FavoriteMovies: []
}
A JSON object holding the account information for the user, along with a User ID. Example:
{
_id: "5fc2db92d1685fe25acf861f",
Username: "oohgaryc",
Email: "garysbestemail@gmail.com",
Password: "pincollector007",
Birthday: new Date("1980-11-18"),
FavoriteMovies: []
}
Allow users to update their information /users/[Username] PUT A JSON object holding new account information for the user. Example:
{
Username: "garyc",
Email: "garysnewemail@yahoo.com",
Password: "pincollector007",
Birthday: new Date("1980-11-18")
}
A JSON object showing the new account information for the user, along with ID. Example:
{
_id: "5fc2db92d1685fe25acf861f",
Username: "garyc",
Email: "garysnewemail@yahoo.com",
Password: "pincollector007",
Birthday: new Date("1980-11-18")
FavoriteMovies: []
}
Allow users to add a movie to their list of favorite movies /users/[Username]/movies/[MovieID] POST None A JSON object showing the user's updated information, with the new movie added to their list of Favorite Movies. Example:
{
"FavoriteMovies": [
"5fc2d9bdd1685fe25acf861b",
"5fc2d9a9d1685fe25acf8619",
"5fc2d979d1685fe25acf8615",
"5fc2d981d1685fe25acf8616",
"5fc2d9c5d1685fe25acf861c"
],
"_id": "5fc2db92d1685fe25acf861f",
"Username": "oohgaryc",
"Email": "garysbestemail@gmail.com",
"Password": "pincollector007",
"Birthday": "1980-11-18T00:00:00.000Z"
}
Allow users to remove a movie from their list of favorite movies /users/[Username]/movies/[MovieID] DELETE None A JSON object showing the user's updated information, with the movie removed from their list of Favorite Movies. Example:
{
"FavoriteMovies": [
"5fc2d9a9d1685fe25acf8619",
"5fc2d979d1685fe25acf8615",
"5fc2d981d1685fe25acf8616",
"5fc2d9c5d1685fe25acf861c"
],
"_id": "5fc2db92d1685fe25acf861f",
"Username": "oohgaryc",
"Email": "garysbestemail@gmail.com",
"Password": "pincollector007",
"Birthday": "1980-11-18T00:00:00.000Z"
}
Allow users to deregister /users/[Username] DELETE None A text message indicating whether the user has been successfully deregistered