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.
Here is the documentation for the Movie API:
Method | Path | Description | Example Response |
---|---|---|---|
GET | /movies | Return json data of list of all movies |
{
"Genre": {
"name": "Drama"
},
"Director": {
"name": "Frank Darabont",
"birthyear": "1959-01-27T23:00:00.000Z",
"deathyear": "N/A",
"bio": "Frank Darabont is a Hungarian-American film director, screenwriter and producer who has been nominated for three Academy Awards and a Golden Globe Award."
},
"_id": "665193d02ccaed80dfcdce01",
"Title": "The Shawshank Redemption",
"Description": "Over the course of several years, two convicts form a friendship, seeking consolation and, eventually, redemption through basic compassion, decency, and hope.",
"ReleaseDate": "1994-10-13T23:00:00.000Z",
"ImageUrl": "https://upload.wikimedia.org/wikipedia/en/8/81/ShawshankRedemptionMoviePoster.jpg",
"Rating": 9.3,
"Featured": true
},
|
GET | /movies/:title | Return json data of a single movie |
{
"Genre": {
"name": "Drama"
},
"Director": {
"name": "Frank Darabont",
"birthyear": "1959-01-27T23:00:00.000Z",
"deathyear": "N/A",
"bio": "Frank Darabont is a Hungarian-American film director, screenwriter and producer who has been nominated for three Academy Awards and a Golden Globe Award."
},
"_id": "665193d02ccaed80dfcdce01",
"Title": "The Shawshank Redemption",
"Description": "Over the course of several years, two convicts form a friendship, seeking consolation and, eventually, redemption through basic compassion, decency, and hope.",
"ReleaseDate": "1994-10-13T23:00:00.000Z",
"ImageUrl": "https://upload.wikimedia.org/wikipedia/en/8/81/ShawshankRedemptionMoviePoster.jpg",
"Rating": 9.3,
"Featured": true
},
|
GET | /movies/genre/:genreName | Return json data of a specific genre |
{
"name": "Sci-Fi",
"description": "Science fiction (sometimes shortened to sci-fi or SF) 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. It has been called the 'literature of ideas', and often explores the potential consequences of scientific, social, and technological innovations."
}
|
GET | /movies//director/:directorName | Return json data of a single director |
{
"name": "Christopher Nolan",
"birthyear": "1970-07-29T23:00:00.000Z",
"deathyear": "N/A",
"bio": "Christopher Nolan is a British-American film director, producer, and screenwriter. He is one of the highest-grossing directors in history, and among the most successful and acclaimed filmmakers of the 21st century. His films have earned over US$5 billion worldwide and garnered a total of 34 Oscar nominations and ten wins."
}
|
GET | /users | Return json data of users list. |
[{
"_id": "66559fdba1850d25a06d10c5",
"username": "John DOe",
"password": "12345",
"email": "dojoM@exmaple.com",
"birthday": "1999-05-20T00:00:00.000Z",
"role": "",
"createdAt": "2024-05-28T09:10:46.439Z",
"favoriteMovies": [],
"__v": 0
},
{
"_id": "6655c0515fa572e1179e6f37",
"username": "Mary Jane",
"password": "12345",
"email": "maryjaneM@exmaple.com",
"birthday": "1999-05-20T00:00:00.000Z",
"role": "user",
"createdAt": "2024-05-28T11:26:44.511Z",
"favoriteMovies": [],
"__v": 0
}]
|
POST | /users | Create a new user |
|
GET | /users/:username | Return Json object of a single user by the username |
{
"_id": "66559fdba1850d25a06d10c5",
"username": "John DOe",
"password": "12345",
"email": "dojoM@exmaple.com",
"birthday": "1999-05-20T00:00:00.000Z",
"role": "",
"createdAt": "2024-05-28T09:10:46.439Z",
"favoriteMovies": [],
"__v": 0
},
|
PUT | /users/:username | Update a user |
{ "username": "Joe P" }
|
POST | /users/:username/movies/:MovieID | add a movie to a user's list of favorites with reference to the movie id. |
{
"_id": "66559fdba1850d25a06d10c5",
"username": "John DOe",
"password": "12345",
"email": "dojoM@exmaple.com",
"birthday": "1999-05-20T00:00:00.000Z",
"role": "",
"createdAt": "2024-05-28T09:10:46.439Z",
"favoriteMovies": [
"6655beaf1124d44932cdcdf6"
],
"__v": 0
}
|
DELETE | /users/:username | Delete a user |
"/users/Joe%20P" |
DELETE | /users/:Username/movies/:MovieID | Delete a movie from a user's list of favorites |
"/users/Joe%20P/moives/6655beaf1124d44932cdcdf6"
|
Reset User Password | /users/:Username/resetpassword | Teset the user password and hash it. |
"/users/Joe%20P/password/6655beaf1124d44932cdcdf6"
|