Project

tmdby

0.0
No commit activity in last 3 years
No release in over 3 years
Full integration of all the TMDB API
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

~> 1.7
~> 10.0
 Project Readme

TMDBY : a Ruby wrapper for the TMDB API

Gem Version Build Status

Features

  • Full integration of all the TMDB API

Installation

Add this line to your application's Gemfile:

gem 'tmdby'

And then execute:

$ bundle

Or install it yourself as:

$ gem install tmdby

How to use

Every API is encapsulated in its own ruby class. For example, the Movie API is in lib/wrappers/movie.rb

Configuration

Set up your api key :

Tmdby::Setup.key = "your_api_key"

By default, every call to TMDB Api is set in insecure mode (HTTP). If you want to enable HTTPS :

Tmdby::Setup.secure = true

If you want, you can set a default language value :

Tmdby::Setup.default_language = "fr"

Example of use

  • Get Movie by id :
Tmdby::Movies.get 550
  • Find by IMDB id :
Tmdby::Find.get "tt0266543", 'imdb_id', language:'es'
  • Discover Movies by criterias :
Tmdby::Discover.movie year: 1994, with_cast: 1269

You can take a look in the tests directory to view a lot of examples.

Helpers

todo

Running tests

Just call rake with your credentials :

% TMDB_API_KEY=<your_tmdb_api_key> TMDB_USERNAME=<your_tmdb_username> TMDB_PASSWORD=<your_tmdb_password> rake

Run options: --seed 60805

# Running:

.......................................................S...................................................................S.

Finished in 53.308930s, 2.3448 runs/s, 16.0573 assertions/s.

125 runs, 856 assertions, 0 failures, 0 errors, 2 skips

You have skipped tests. Run with --verbose for details.

Changelog

TMDB API updates

  • 2016-10-17 Add recommendation api , up-to-date with "Captain America" TMDB API update See blog post
  • 2016-01-27 Add movie/id/release_dates api See blog post
  • 2015-10-30 Up-to-date with "Jurassic World" TMDB API update

More to come

  • callback parameter support
  • images helpers

Contributing

  1. Fork it ( https://github.com/a-legrand/tmdby/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request