Class: ThetvdbApi::Base

Inherits:
Object
  • Object
show all
Includes:
ServiceApi::BaseFaraday
Defined in:
lib/thetvdb_api/base.rb

Direct Known Subclasses

Actor, Banner, Episode, Search, Series, Update

Instance Method Summary collapse

Instance Method Details

#api_key_optionsObject



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

def api_key_options
  { apikey: @config[:api_key] }
end

#api_key_with_language_optionsObject



14
15
16
# File 'lib/thetvdb_api/base.rb', line 14

def api_key_with_language_options
  api_key_options.merge(language_options)
end

#language_optionsObject



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

def language_options
  { language: @config[:language] }
end

#normalize_episode_id_options(*options) ⇒ Object



30
31
32
# File 'lib/thetvdb_api/base.rb', line 30

def normalize_episode_id_options(*options)
  normalize_options([:episode_id], *options)
end

#normalize_series_id_absolute_options(*options) ⇒ Object



22
23
24
# File 'lib/thetvdb_api/base.rb', line 22

def normalize_series_id_absolute_options(*options)
  normalize_options([:series_id, :absolute], *options)
end

#normalize_series_id_air_date_options(*options) ⇒ Object



38
39
40
# File 'lib/thetvdb_api/base.rb', line 38

def normalize_series_id_air_date_options(*options)
  normalize_options({ series_id: :seriesid, air_date: :airdate }, *options)
end

#normalize_series_id_episode_options(*options) ⇒ Object



26
27
28
# File 'lib/thetvdb_api/base.rb', line 26

def normalize_series_id_episode_options(*options)
  normalize_options([:series_id, :season, :episode], *options)
end

#normalize_series_id_options(*options) ⇒ Object



18
19
20
# File 'lib/thetvdb_api/base.rb', line 18

def normalize_series_id_options(*options)
  normalize_options([:series_id], *options)
end

#normalize_series_name_options(*options) ⇒ Object



34
35
36
# File 'lib/thetvdb_api/base.rb', line 34

def normalize_series_name_options(*options)
  normalize_options({ name: :seriesname }, *options)
end