Class: ThetvdbApi::Episode

Inherits:
Base
  • Object
show all
Defined in:
lib/thetvdb_api/episode.rb

Instance Method Summary collapse

Methods inherited from Base

#api_key, #connection, #get, #initialize, #language, #params, #prepare_uri, #response, #restful_param_keys, #series_uri, #uri, #url

Constructor Details

This class inherits a constructor from ThetvdbApi::Base

Instance Method Details

#find(episode_id, options = {}) ⇒ Object



15
16
17
# File 'lib/thetvdb_api/episode.rb', line 15

def find(episode_id, options = {})
  get("{api_key}/episodes/{episode_id}/{language}.xml").params({ episode_id: episode_id }.merge(options)).response
end

#find_by_absolute_order(series_id, absolute, options = {}) ⇒ Object



10
11
12
13
# File 'lib/thetvdb_api/episode.rb', line 10

def find_by_absolute_order(series_id, absolute, options = {})
  get("#{series_uri}/absolute/{absolute}/{language}.xml").
    params({ series_id: series_id, absolute: absolute }.merge(options)).response
end

#find_by_default_order(series_id, season, episode, options = {}) ⇒ Object



2
3
4
# File 'lib/thetvdb_api/episode.rb', line 2

def find_by_default_order(series_id, season, episode, options = {})
  find_by_order('default', series_id, season, episode, options)
end

#find_by_dvd_order(series_id, season, episode, options = {}) ⇒ Object



6
7
8
# File 'lib/thetvdb_api/episode.rb', line 6

def find_by_dvd_order(series_id, season, episode, options = {})
  find_by_order('dvd', series_id, season, episode, options)
end

#find_by_order(order, series_id, season, episode, options) ⇒ Object



19
20
21
22
# File 'lib/thetvdb_api/episode.rb', line 19

def find_by_order(order, series_id, season, episode, options)
  get("#{series_uri}/{order}/{season}/{episode}/{language}.xml").
    params({ series_id: series_id, season: season, episode: episode, order: order }.merge(options)).response
end