This API provides information about movies, genres, and directors. Users can interact with the API to retrieve details about movies, genres, directors, create new users, and manage their favorite movies.
-
Request:
- Method:
GET
- URL:
/movies
- Request Body: None
- Method:
-
Response:
- Format: JSON
- Description: A JSON object containing data on all movies.
-
Request:
- Method:
GET
- URL:
/movies/[id]
- Request Body: None
- Method:
-
Response:
- Format: JSON
- Description: A JSON object containing data about a specific movie, including title, description, director details, genre with description, release date, image URL, and featured status.
-
Request:
- Method:
GET
- URL:
/movies/genre/[name]
- Request Body: None
- Method:
-
Response:
- Format: JSON
- Description: A JSON object containing the description of a genre.
-
Request:
- Method:
GET
- URL:
/movies/director/[name]
- Request Body: None
- Method:
-
Response:
- Format: JSON
- Description: A JSON object containing details about a director, including name, bio, birth date, and death date.
-
Request:
- Method:
POST
- URL:
/users
- Request Body Format: JSON
{ "username": "AdamSandler", "password": "LunchLady123", "email": "aSandler@fake.co", "birthday": "1923-02-31" }
- Method:
-
Response:
- Format: JSON
- Description: A JSON object with user details, including the new user's ID, version, date, and an empty list of favorite movies.
-
Request:
- Method:
PUT
- URL:
/users/[id]
- Request Body Format: JSON (with at least one updated field)
{ "username": "MrNewson", "email": "m.newson@fake.co" }
- Method:
-
Response:
- Format: JSON
- Description: Updated user details.
-
Request:
- Method:
POST
- URL:
/users/[id]/movies/[movie_id]
- Request Body: None
- Method:
-
Response:
- Format: JSON
- Description: Updated user details.
-
Request:
- Method:
DELETE
- URL:
/users/[id]/movies/[movie_id]
- Request Body: None
- Method:
-
Response:
- Format: JSON
- Description: Updated user details.
-
Request:
- Method:
DELETE
- URL:
/users/[id]
- Request Body: None
- Method:
-
Response:
- Format: JSON
- Description: A message confirming the removal of the user.
- Node.js
- Express.js
- MongoDB with Mongoose
- bcrypt
- body-parser
- cors
- express-validator
- jsonwebtoken
- lodash
- passport
- passport-jwt
- passport-local
- uuid
- Install dependencies:
npm install
- Start the server:
npm start
or for development with nodemon:npm run dev
- Sean Andrew Stanek
This project is licensed under the ISC License.
Feel free to explore and interact with the Movie API!