const { Movies } = require('nytimes-api');
const movies = new Movies('your-super-secret-api-key');
movies.searchReviews('The Terminator', data => console.log(data);
What does it do?
searchReviews searches for a review of a movie on the New York Times' database. The above code searches for a movie review of The Terminator, and logs the results.
Example Response
example-response.json
{ display_title: 'The Terminator',
mpaa_rating: 'R',
critics_pick: 0,
byline: 'Janet Maslin',
headline: 'TERMINATOR, THE (MOVIE)',
summary_short: 'Ruthless cyborg from future. Fast, vivid sci-fi.',
publication_date: '1984-10-26',
opening_date: '1984-10-26',
date_updated: '2017-11-02 04:17:33',
link:
{ type: 'article',
url:
'http://www.nytimes.com/1984/10/26/movies/the-screen-terminator-suspense-tale.html',
suggested_link_text: 'Read the New York Times Review of The Terminator' },
multimedia: null }