Code Monkey home page Code Monkey logo

movie-api's Introduction

Movie API

Instructions

In the initial commit to this project, you have been provided with data for the AFI Top 100 movies. Your task is to implement an Express driven REST API that allows a user to retrieve this data. Your API should support three requests types 1) A request for all data, 2) A request for all movies by a director, 3) A request for a movie by title. Note that you should support partial matches as shown below.

Requests and Expected Respones

Get All

GET http://localhost:1337/movies

Response

[{
  title: "12 Angry Men",
  directors: ["Sidney Lumet"],
  releaseDate: "4/10/1957",
  rating: "Not Rated",
  runTime: "95 mins",
  genres: ["Drama"],
},
... all other movies
]

Get By Title

GET http://localhost:1337/movies/lord

Response

[{
  title: "The Lord Of The Rings: The Fellowship Of The Ring",
  directors: ["Peter Jackson"],
  releaseDate: "12/19/2001",
  rating: "PG-13",
  runTime: "178 mins",
  genres: ["Adventure", "Drama", "Fantasy"],
}]

Get By Director

GET http://localhost:1337/movies/darabont

Response

[{
  title: "The Shawshank Redemption",
  directors: ["Frank Darabont"],
  releaseDate: "10/14/1994",
  rating: "R",
  runTime: "142 mins",
  genres: ["Drama"],
}]

Create New

POST http://localhost:1337/movies

Body

{
  title: "Cabin in the Woods",
  directors: ["Drew Goddard"],
  releaseDate: "04/13/2012",
  rating: "R",
  runTime: "95 mins",
  genres: ["Horror"],
}

Response

{
  title: "Cabin in the Woods",
  directors: ["Drew Goddard"],
  releaseDate: "04/13/2012",
  rating: "R",
  runTime: "95 mins",
  genres: ["Horror"],
}

movie-api's People

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.