Skip to content
This repository
branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 spec
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .rspec
Octocat-spinner-32 Gemfile
Octocat-spinner-32 README.md
Octocat-spinner-32 Rakefile
Octocat-spinner-32 tmdb_easy.gemspec
README.md

TMDB Easy

Simple wrapper for TMDB API.

Installing

Put in your Gemfile:

gem 'tmdb-easy', github: 'brunohenrique/tmdb-easy'

Using

Configure

Specify the API Key (to get one just do a TMDB account):

TmdbEasy::Base.api_key 'my_apy_key'

Movie

## Get a movie by TMDB id
movie = TmdbEasy::Movie.find 550
# => #<TmdbEasy::Movie @attributes=...>

movie.title
# => 'Fight Club'

## Search movie by terms returning full movie objects
movies = TmdbEasy::Movie.search 'fight club'
movies.map(&:title)
# => ['Fight Club', 'Jurassic Fight Club', ...]

Search

# TmdbEasy::Search.fetch terms, resource_type [movie, keyword*, person*, etc*]
search = TmdbEasy::Search.fetch 'fight club', 'movie'
search.results
# => [{"adult"=>false, "backdrop_path"=>"/8uO0gUM8aNqYLs1OsTBQiXu0fEv.jpg", "id"=>550, "original_title"=>"Fight Club", "release_date"=>"1999-10-14", "poster_path"=>"/2lECpi35Hnbpa4y46JX0aY3AWTy.jpg", "popularity"=>13.6327066209895, "title"=>"Fight Club", "vote_average"=>7.5, "vote_count"=>2614},
#     {"adult"=>false, "backdrop_path"=>nil, "id"=>151912, "original_title"=>"Jurassic Fight Club", "release_date"=>"", "poster_path"=>nil, "popularity"=>0.46, "title"=>"Jurassic Fight Club", "vote_average"=>0.0, "vote_count"=>0}, ...]

Contributing

Developing

Testing

rspec

*Not implemented yet

Something went wrong with that request. Please try again.