This API application provides two endpoints for creating and retrieving movie collections. One of the endpoint allows users to create new collections, while the other endpoint allows users to retrieve a specific collection by the ID that received with POST.
https://expressjs-movie-organizer-api.vercel.app/
- npm
- node js
- express JS
- mysql
- nodemon
- cors
- dotenv
- body-parser
To use this API application, you will need to have Node.js and npm installed on your machine. Once you have those installed, you can run the following commands to get started:
npm install
nodemon index
POST "/collection" This endpoint allows users to create new collections. To create a new collection, send a POST request to "/collection" with a JSON body containing the collection data. The collection data should include a title and an array of movie imdbIDs.
Example request body:
{
"title": "My collection",
"movies": [
"t3248924",
"t4450678",
"t7709609"
]
}
GET "/collection/:id" This endpoint allows users to retrieve a specific collection by received ID. To retrieve a collection, send a GET request to "collection/:id", where :id is the ID of the collection you want to retrieve.
Example response:
{
"id": 51,
"title": "My collection",
"movie": [
"tt0068646",
"tt0098019"
]
}
Nijat Gurbanov
- Github: github.com/NikoFX
- Twitter: Nijat Gurbanov
- Linkedin: linkedin.com/in/nijat-gurbanov-dev
- Fork it
- Create your feature branch (
git checkout -b feature/fooBar
) - Commit your changes (
git commit -am 'Add some fooBar'
) - Push to the branch (
git push origin feature/fooBar
) - Create a new Pull Request