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_options, #api_key_with_language_options, #language_options, #normalize_episode_id_options, #normalize_series_id_absolute_options, #normalize_series_id_air_date_options, #normalize_series_id_episode_options, #normalize_series_id_options, #normalize_series_name_options

Instance Method Details

#find(*options) ⇒ Object

Find the episode data by episode id.

access: FREE param (flat params):

find(episode_id)
find(1234)

param (hash params):

find(episode_id: 1234)

output: Faraday::Response instance with parsed XML string example: thetvdb.com/wiki/index.php/API:Base_Episode_Record



95
96
97
# File 'lib/thetvdb_api/episode.rb', line 95

def find(*options)
  find_path_with_params(*options).get
end

#find_by_absolute_order(*options) ⇒ Object

Find the episode data, sorts using the absolute ordering method.

access: FREE param (flat params):

find_by_absolute_order(series_id, absolute)
find_by_absolute_order(1234, 1)

param (hash params):

find_by_absolute_order(series_id: 1234, absolute: 1)

output: Faraday::Response instance with parsed XML string example: thetvdb.com/wiki/index.php/API:Base_Episode_Record



67
68
69
# File 'lib/thetvdb_api/episode.rb', line 67

def find_by_absolute_order(*options)
  find_by_absolute_order_path_with_params(*options).get
end

#find_by_absolute_order_url(*options) ⇒ Object

Find the episode data, sorts using the absolute ordering method - return only url.

access: FREE param: options hash param (flat params):

find_by_absolute_order_url(series_id, absolute)
find_by_absolute_order_url(1234, 1)

param (hash params):

find_by_absolute_order_url(series_id: 1234, absolute: 1)

output: url string



81
82
83
# File 'lib/thetvdb_api/episode.rb', line 81

def find_by_absolute_order_url(*options)
  find_by_absolute_order_path_with_params(*options).url
end

#find_by_default_order(*options) ⇒ Object

Find the episode data, sorts using the default ordering method.

access: FREE param (flat params):

find_by_default_order(series_id, season, episode)
find_by_default_order(1234, 1, 2)

param (hash params):

find_by_default_order(series_id: 1234, season: 1, episode: 1)

output: Faraday::Response instance with parsed XML string example: thetvdb.com/wiki/index.php/API:Base_Episode_Record



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

def find_by_default_order(*options)
  find_by_order(normalize_series_id_episode_options(*options).merge(order: 'default'))
end

#find_by_default_order_url(*options) ⇒ Object

Find the episode data, sorts using the default ordering method - return only url.

access: FREE param (flat params):

find_by_default_order_url(series_id, season, episode)
find_by_default_order_url(1234, 1, 2)

param (hash params):

find_by_default_order_url(series_id: 1234, season: 1, episode: 1)

output: url string



25
26
27
# File 'lib/thetvdb_api/episode.rb', line 25

def find_by_default_order_url(*options)
  find_by_order_url(normalize_series_id_episode_options(*options).merge(order: 'default'))
end

#find_by_dvd_order(*options) ⇒ Object

Find the episode data, sorts using the dvd ordering method.

access: FREE param (flat params):

find_by_dvd_order(series_id, season, episode)
find_by_dvd_order(1234, 1, 2)

param (hash params):

find_by_dvd_order(series_id: 1234, season: 1, episode: 1)

output: Faraday::Response instance with parsed XML string example: thetvdb.com/wiki/index.php/API:Base_Episode_Record



39
40
41
# File 'lib/thetvdb_api/episode.rb', line 39

def find_by_dvd_order(*options)
  find_by_order(normalize_series_id_episode_options(*options).merge(order: 'dvd'))
end

#find_by_dvd_order_url(*options) ⇒ Object

Find the episode data, sorts using the dvd ordering method - return only url.

access: FREE param: options hash param (flat params):

find_by_dvd_order_url(series_id, season, episode)
find_by_dvd_order_url(1234, 1, 2)

param (hash params):

find_by_dvd_order_url(series_id: 1234, season: 1, episode: 1)

output: url string



53
54
55
# File 'lib/thetvdb_api/episode.rb', line 53

def find_by_dvd_order_url(*options)
  find_by_order_url(normalize_series_id_episode_options(*options).merge(order: 'dvd'))
end

#find_url(*options) ⇒ Object

Find the episode data by episode id - return only url.

access: FREE param (flat params):

find_url(episode_id)
find_url(1234)

param (hash params):

find_url(episode_id: 1234)

output: url string



108
109
110
# File 'lib/thetvdb_api/episode.rb', line 108

def find_url(*options)
  find_path_with_params(*options).url
end