Class: ThetvdbApi::Client

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Client



4
5
6
7
# File 'lib/thetvdb_api/client.rb', line 4

def initialize(options = {})
  @api_key = options[:api_key] ? options[:api_key] : ThetvdbApi::Configuration.api_key
  @language = options[:language] ? options[:language] : ThetvdbApi::Configuration.language
end

Instance Attribute Details

#api_keyObject (readonly)

Returns the value of attribute api_key.



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

def api_key
  @api_key
end

#languageObject (readonly)

Returns the value of attribute language.



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

def language
  @language
end

Instance Method Details

#actorObject



17
18
19
# File 'lib/thetvdb_api/client.rb', line 17

def actor
  @actor ||= ThetvdbApi::Actor.new(self)
end


21
22
23
# File 'lib/thetvdb_api/client.rb', line 21

def banner
  @banner ||= ThetvdbApi::Banner.new(self)
end

#episodeObject



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

def episode
  @episode ||= ThetvdbApi::Episode.new(self)
end

#searchObject



9
10
11
# File 'lib/thetvdb_api/client.rb', line 9

def search
  @search ||= ThetvdbApi::Search.new(self)
end

#seriesObject



13
14
15
# File 'lib/thetvdb_api/client.rb', line 13

def series
  @series ||= ThetvdbApi::Series.new(self)
end

#updateObject



29
30
31
# File 'lib/thetvdb_api/client.rb', line 29

def update
  @update ||= ThetvdbApi::Update.new(self)
end