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

Returns a new instance of Client.



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

def initialize(options = {})

  @api_key = options[:api_key] ? options[:api_key] : ThetvdbApi::Configuration.api_key
  @api_url = options[:api_url] ? options[:api_url] : ThetvdbApi::Configuration.api_url
  @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

#api_urlObject (readonly)

Returns the value of attribute api_url.



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

def api_url
  @api_url
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



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

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


23
24
25
# File 'lib/thetvdb_api/client.rb', line 23

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

#episodeObject



27
28
29
# File 'lib/thetvdb_api/client.rb', line 27

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

#searchObject



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

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

#seriesObject



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

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

#updateObject



31
32
33
# File 'lib/thetvdb_api/client.rb', line 31

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