GithubHelp home page GithubHelp logo

magician11 / rottentomatoes-data Goto Github PK

View Code? Open in Web Editor NEW
2.0 3.0 0.0 20 KB

Fetch Rotten Tomatoes data for a movie (if available).

Home Page: https://www.npmjs.com/package/rottentomatoes-data

License: MIT License

JavaScript 100.00%

rottentomatoes-data's Introduction

rottentomatoes-data

Fetch Rotten Tomatoes data for a movie (if available).

Specifically, it'll search for a movie title, and if found on Rotten Tomatoes, will return:

  • the tomato meter score (as a percentage)
  • the tomato meter class
  • the critics concensus
  • the URL of the movie on Rotten Tomatoes
  • the name of the movie
  • the year of the movie
  • the principal actors

Installing

npm install rottentomatoes-data

Usage

Running this code

const fetchRTdata = require('rottentomatoes-data');

const go = async () => {
  const data = await fetchRTdata('The Matrix');
  console.log(data);
};

go();

will output

{ ok: true,
  movie:
   { name: 'The Matrix',
     meterScore: 88,
     meterClass: 'certified_fresh',
     year: 1999,
     url: 'https://www.rottentomatoes.com/m/matrix',
     consensus:
      'Thanks to the Wachowskis\' imaginative vision, The Matrix is a smartly crafted combination of spectacular action and groundbreaking special effects.',
     actors: [ 'Keanu Reeves', 'Laurence Fishburne', 'Carrie-Anne Moss' ] } }

An error response will look like

{ ok: false, error: 'movie_not_found' }

So check the ok parameter when processing the response.

Notes

No API key is required for this to work. Thanks to @jaebradley for this info from his rotten_tomatoes_client repo.

rottentomatoes-data's People

Contributors

magician11 avatar

Stargazers

André Santos avatar  avatar

Watchers

James Cloos avatar  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.