Sha256: 0707fe1246a3dc2547e0bd89613f103f9dcb5b79af5660896850f92e64a12c96

Contents?: true

Size: 1.29 KB

Versions: 1

Compression:

Stored size: 1.29 KB

Contents

= tmdb_party

Simple ruby wrapper to themoviedb.org (http://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: http://api.themoviedb.org/2.0/docs/

== Contributors
Jon Maddox (http://github.com/maddox)
Magnus Bergmark (http://github.com/Mange)
Brian Lopez (https://github.com/brianmario)
Federico Ravasio (https://github.com/razielgn)

== Copyright

Copyright (c) 2009 John Duff. See LICENSE for details.

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tmdb_party-0.8.0 README.rdoc