jduff / tmdb_party

Simple ruby wrapper to themoviedb.org (http://api.themoviedb.org/2.0/docs/) using HTTParty

This URL has Read+Write access

name age message
file .document Mon May 04 18:52:18 -0700 2009 Initial commit to tmdb_party. [jduff]
file .gitignore Mon May 04 18:52:18 -0700 2009 Initial commit to tmdb_party. [jduff]
file LICENSE Mon May 04 18:52:18 -0700 2009 Initial commit to tmdb_party. [jduff]
file README.rdoc Loading commit data...
file Rakefile Fri Oct 09 21:05:14 -0700 2009 updated summary in gemspec [jduff]
file VERSION.yml Tue Nov 03 08:03:30 -0800 2009 Version bump to 0.4.1 [maddox]
directory lib/
directory test/ Tue Nov 03 08:00:59 -0800 2009 added a test to make sure the results returned ... [maddox]
file tmdb_party.gemspec Tue Nov 03 08:03:46 -0800 2009 new gem [maddox]
README.rdoc

tmdb_party

Simple ruby wrapper to themoviedb.org (api.themoviedb.org/2.0/docs/) using HTTParty

usage:

  sudo gem install tmdb_party -s http://gemcutter.org
  require 'rubygems'
  require 'tmdb_party'

example:

  @tmdb = TMDBParty::Base.new('key')
  results = @tmdb.search('transformers')

  results.length
    # => 5

  transformers = results.detect{|m| m.name == "Transformers"}

  transformers.popularity
    # => 31
  transformers.score
    # => 1.0
  transformers.imdb_id
    # => 'tt0418279'

  # some attributes don't come back with the search result, they are lazily loaded on demand
  transformers.homepage
    # => "http://www.transformersmovie.com/"
  transformers.trailer.url
    # => "http://www.youtube.com/watch?v=eduwcuq1Exg"

  transformers.genres.collect{|cat| cat.name}.include?("Adventure")
    # => true

what is themoviedb.org?

It’s a movie database, kind of like IMDB except it’s more of a community wiki. They also have an api that they’re cool with people using. More on the api here: api.themoviedb.org/2.0/docs/

Contributors

Jon Maddox (github.com/maddox)

Copyright

Copyright © 2009 John Duff. See LICENSE for details.