Goal: 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
Request | URL | Method | Request body data format | Response body data format |
---|---|---|---|---|
Get a list of ALL movies | /movies | GET | none | A JSON object holding an array with all movies. |
Get data about a single movie by title | /movies/[movieTitle] | GET | none |
A JSON object holding data about a single movie, containing
description, genre, director, image URL, whether it's featured or not.
{
|
Get a list of all users | /users | GET | none | A JSON object holding an array with all users. |
Get data about genre | /movies/genre/[genreName] | GET | none |
A JSON array holding objects with all the movies that belong to the
searched genre:
[
|
Get data about a director by name | /movies/directors/[directorName] | GET | none |
A JSON object holding data with all the movies that belong to the
searched director:
{
|
Add a new user | /users | POST |
A JSON object holding user data with 3 requierd fields [Username]
[Password] [Email] and last optional field [Birthday]:
{
|
A JSON object holding all the user data including the generated ID:
{
|
Update user username | /users/[currentUsername] | PUT |
A JSON object holding user data with 3 required fields [Username]
[Password] [Email].
{
|
An updated JSON object with all user data and the updated username:
{
|
Add a movie to user favorite list | users/[username]/movies/[movieID] | POST | None |
An updated JSON object that includes user data with the addition of
the movie to the user's favoriteMovies array:
{
|
Remove a movie from user favorite list | users/[username]/movies/[movieID] | DELETE | None | A text message indicating whether a movie was successfully removed from the favorite list. |
Delete user registration | /users/[username] | DELETE | None | A text message indicating whether [username] was successfully deleted. |