Skip to content

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

License

Notifications You must be signed in to change notification settings

NikoFX/express-movie-organizer-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

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.

Url

https://expressjs-movie-organizer-api.vercel.app/

Tools

NPM NodeJS Nodemon Express.js JavaScript MySQL

  • npm
  • node js
  • express JS
  • mysql
  • nodemon
  • cors
  • dotenv
  • body-parser

Development setup

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"
    ]
}

Meta

Nijat Gurbanov

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b feature/fooBar)
  3. Commit your changes (git commit -am 'Add some fooBar')
  4. Push to the branch (git push origin feature/fooBar)
  5. Create a new Pull Request

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published