#Express with APIs - OMDB
We'll be creating an app that connects to OMDB, a public movie API.
##Note
Fork and clone this repository and setup a basic Express app. Make sure to finish the main requirements for this project, because we'll be adding to the assignment over the next week.
##Requirements
- User goes to home page that has a search form field for a movie.
- The search form will take the user to a search results page of movie listings on the route.
- Each movie link should click into a view with detailed information about the movie.
##How to get Started
- Create a form that sends a query and gets results from the OMDB API. Read over the documentation to see the endpoints needed.
The next step is to turn the movie results into links that will go to a new route, and make an additional API requests for additional movie details.
-
From the search results page, we notice along with every movie entry there is a IMDBid. Have each movie link to a route like
/movie/tt234323
. Take the parameter from that url and make an additional API call to retrieve movie details related to thatimdbID
-
Create a new route that takes the paramaters of the
imdbID
in the url on amovies
controller. The route you will need to make will look like/movies/:imdbId
. Using the data fromreq.params
make a second api call to the api to get the movie details.
##Tips
-
The
data
object we get back in arequest
callback, is astring
of the data. UseJSON.parse(data)
to turn that data back into an object. -
The movie api returns an array of movies inside the
Search
Key. -
Make sure you do the
res.render
inside the callback function of the request.
##Bonus
- Add stars images to reflect the imdb ratings
- Figure out what parameters are need to access the rotten tomato listings.