ThetvdbApi
thetvdb_api is a simple ruby client for accessing TV shows information from the thetvdb.com API.
Getting started
You can add it to your Gemfile with:
gem 'thetvdb_api'
Run the bundle command to install it.
How to use
You have two way for access to api:
I way (create client class, one entry point)
II way (direct access to api class, many entry points)
Search series (by name) methods - access by search method or Search class
client = ThetvdbApi::Client.new(api_key: '...', language: 'en')
client.search.get_series( = {})
client.search.get_series_url( = {}) # return only full url
client.search.get_series_by_remote_id( = {})
client.search.get_series_by_remote_id_url( = {}) # return only full url
client.search.get_episode( = {})
client.search.get_episode_url( = {}) # return only full url
search = ThetvdbApi::Search.new(api_key: '...', language: 'en')
search.get_series( = {})
search.get_series_url( = {}) # return only full url
search.get_series_by_remote_id( = {})
search.get_series_by_remote_id_url( = {}) # return only full url
search.get_episode( = {})
search.get_episode_url( = {}) # return only full url
Search series (by id) methods - access by series method or Series class
client = ThetvdbApi::Client.new(api_key: '...', language: 'en')
client.series.find( = {})
client.series.find_url( = {}) # return only full url
client.series.find_full( = {})
client.series.find_full_url( = {}) # return only full url
client = ThetvdbApi::Series.new(api_key: '...', language: 'en')
series.find( = {})
series.find_url( = {}) # return only full url
series.find_full( = {})
series.find_full_url( = {}) # return only full url
Return series actors - access by actor method or Actor class
client = ThetvdbApi::Client.new(api_key: '...', language: 'en')
client.actor.all( = {})
client.actor.all_url( = {}) # return only full url
actor = ThetvdbApi::Actor.new(api_key: '...', language: 'en')
actor.all( = {})
actor.all_url( = {}) # return only full url
Return series banners - access by banner method or Banner class
client = ThetvdbApi::Client.new(api_key: '...', language: 'en')
client..all( = {})
client..all_url( = {}) # return only full url
= ThetvdbApi::Banner.new(api_key: '...', language: 'en')
.all( = {})
.all_url( = {}) # return only full url
Return series episode - access by episode method or Episode class
client = ThetvdbApi::Client.new(api_key: '...', language: 'en')
client.episode.find_by_default_order( = {})
client.episode.find_by_default_order_url( = {}) # return only full url
client.episode.find_by_dvd_order( = {})
client.episode.find_by_dvd_order_url( = {}) # return only full url
client.episode.find_by_absolute_order( = {})
client.episode.find_by_absolute_order_url( = {}) # return only full url
client.episode.find( = {})
client.episode.find_url( = {}) # return only full url
episode = ThetvdbApi::Episode.new(api_key: '...', language: 'en')
episode.find_by_default_order( = {})
episode.find_by_default_order_url( = {}) # return only full url
episode.find_by_dvd_order( = {})
episode.find_by_dvd_order_url( = {}) # return only full url
episode.find_by_absolute_order( = {})
episode.find_by_absolute_order_url( = {}) # return only full url
episode.find( = {})
episode.find_url( = {}) # return only full url
Get updates - access by update method or Update class
client = ThetvdbApi::Client.new(api_key: '...', language: 'en')
client.update.day
client.update.day_url # return only full url
client.update.week
client.update.week_url # return only full url
client.update.month
client.update.month_url # return only full url
client.update.all
client.update.all_url # return only full url
update = ThetvdbApi::Update.new(api_key: '...', language: 'en')
update.day
update.day_url # return only full url
update.week
update.week_url # return only full url
update.month
update.month_url # return only full url
update.all
update.all_url # return only full url
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create new Pull Request




