Project

movies

0.01
No commit activity in last 3 years
No release in over 3 years
Ruby bindings for IMDb using imdbapi.com as source
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
>= 0

Runtime

 Project Readme

Movies

Movies is the bridge between IMDb's unofficial API; imdbapi.com and Ruby.

Follow me on Twitter or Github for more info and updates.

How to use

Search for a title

Movies.find_by_title("The dark night")

Find movie based on an IMDb id

Movies.find_by_id("tt0337978")

Find by release name

This method will try to filter out as much irrelevant data as possible using this exclude list, before doing a request to the server. It will also try to find a release year in the title, which will be passed to imdbapi.com.

Movies.find_by_release_name("Heartbreaker.2010.LIMITED.DVDRip.XviD-SUBMERGE")

The snippet above will pass the following data to the server.

Movies.find_by_title("Heartbreaker", {
  y: "2010"
})

Settings

You can pass some arguments if you for example want to search for a particular year.

Movies.find_by_title("The dark night", {
  y: "2010"
})

These params are supported.

  • y (Any number) Year of the movie.
  • plot (short, full) Short or extended plot (short default).
  • tomatoes (Boolean) Adds rotten tomatoes data.

Rottentomatoes

movie = Movies.find_by_title("Die Hard 4.0", {
  tomatoes: "true"
})

movie.tomato.meter
# => 82
movie.tomato.image
# => "certified"
movie.tomato.rating
# => 6.8
movie.tomato.reviews
# => 198
movie.tomato.fresh
# => 162
movie.tomato.rotten
# => 36

Data to work with

These accessors are available for the object that is being returned from the find_by_* methods.

  • year (Fixnum) Year of the movie.
  • released (Date) Release date.
  • writers (Array < String >) Writers.
  • actors (Array < String>) Actors.
  • director (String) Name of director.
  • rating (Float) Rating from 1.0 to 10.0.
  • votes (Float) Number of votes.
  • runtime (Fixnum) Run time in seconds.
  • href (String) IMDb url.
  • id (String) IMDb id.
  • poster (String) Url to poster.
  • found? (Boolean) Where anything found?

How to install

[sudo] gem install movies

Requirements

Movies is tested in OS X 10.6.7 using Ruby 1.9.2.

License

Movies is released under the MIT license.