Skip to content

tkmoney/angular-rotten-tomatoes

 
 

Repository files navigation

Angular Rotten Tomatoes Build Status

Wraps the Rotten Tomatoes API into a AngularJS service.

angular.module('app', ['ngRottenTomatoes'])
.config(function(rottenTomatoesProvider) {
  rottenTomatoesProvider.setKey('YOUR_TOKEN');
});

Inject the service to perform request to the api and get the returning promise.

function AppCtrl(rottenTomatoes) {
  rottenTomatoes.movie.info(ID).success(function(data) {
    $scope.movie = data;
  });
}

Available methods:

function AppCtrl(rottenTomatoes) {
  // DVDs Directory
  rottenTomatoes.topRentals();
  rottenTomatoes.currentReleases();
  rottenTomatoes.newReleases();
  rottenTomatoes.upcomingDvds();

  // Movies Directory
  rottenTomatoes.boxOffice();
  rottenTomatoes.inTheaters();
  rottenTomatoes.opening();
  rottenTomatoes.upcomingMovies();

  // Movies Search
  rottenTomatoes.search(query);

  // Movie information
  rottenTomatoes.movieInfo(id);
  rottenTomatoes.movieReviews(id);
  rottenTomatoes.movieCast(id);
  rottenTomatoes.movieSimilar(id);
  rottenTomatoes.movieClips(id);
}

About

Rotten Tomatoes API to AngularJS

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%