Class: ThetvdbApi::Client
- Inherits:
-
Object
- Object
- ThetvdbApi::Client
- Defined in:
- lib/thetvdb_api/client.rb
Instance Attribute Summary collapse
-
#api_key ⇒ Object
readonly
Returns the value of attribute api_key.
-
#api_url ⇒ Object
readonly
Returns the value of attribute api_url.
-
#language ⇒ Object
readonly
Returns the value of attribute language.
Instance Method Summary collapse
- #actor ⇒ Object
- #banner ⇒ Object
- #episode ⇒ Object
-
#initialize(options = {}) ⇒ Client
constructor
A new instance of Client.
- #search ⇒ Object
- #series ⇒ Object
- #update ⇒ Object
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( = {}) @api_key = [:api_key] ? [:api_key] : ThetvdbApi::Configuration.api_key @api_url = [:api_url] ? [:api_url] : ThetvdbApi::Configuration.api_url @language = [:language] ? [:language] : ThetvdbApi::Configuration.language end |
Instance Attribute Details
#api_key ⇒ Object (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_url ⇒ Object (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 |
#language ⇒ Object (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
#actor ⇒ Object
19 20 21 |
# File 'lib/thetvdb_api/client.rb', line 19 def actor @actor ||= ThetvdbApi::Actor.new(self) end |
#banner ⇒ Object
23 24 25 |
# File 'lib/thetvdb_api/client.rb', line 23 def @banner ||= ThetvdbApi::Banner.new(self) end |
#episode ⇒ Object
27 28 29 |
# File 'lib/thetvdb_api/client.rb', line 27 def episode @episode ||= ThetvdbApi::Episode.new(self) end |
#search ⇒ Object
11 12 13 |
# File 'lib/thetvdb_api/client.rb', line 11 def search @search ||= ThetvdbApi::Search.new(self) end |
#series ⇒ Object
15 16 17 |
# File 'lib/thetvdb_api/client.rb', line 15 def series @series ||= ThetvdbApi::Series.new(self) end |
#update ⇒ Object
31 32 33 |
# File 'lib/thetvdb_api/client.rb', line 31 def update @update ||= ThetvdbApi::Update.new(self) end |