Class: ThetvdbApi::Client
- Inherits:
-
Object
- Object
- ThetvdbApi::Client
- Defined in:
- lib/thetvdb_api/client.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
Instance Method Summary collapse
- #actor ⇒ Object
- #banner ⇒ Object
- #episode ⇒ Object
-
#initialize(config = {}) ⇒ Client
constructor
A new instance of Client.
- #search ⇒ Object
- #series ⇒ Object
- #server ⇒ Object
- #update ⇒ Object
Constructor Details
#initialize(config = {}) ⇒ Client
Returns a new instance of Client.
4 5 6 7 8 9 |
# File 'lib/thetvdb_api/client.rb', line 4 def initialize(config = {}) @config = config @config[:adapter] ||= :net_http @config[:language] ||= 'en' end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
2 3 4 |
# File 'lib/thetvdb_api/client.rb', line 2 def config @config end |
Instance Method Details
#actor ⇒ Object
19 20 21 |
# File 'lib/thetvdb_api/client.rb', line 19 def actor @actor ||= ThetvdbApi::Actor.new(config) end |
#banner ⇒ Object
27 28 29 |
# File 'lib/thetvdb_api/client.rb', line 27 def @banner ||= ThetvdbApi::Banner.new(config) end |
#episode ⇒ Object
31 32 33 |
# File 'lib/thetvdb_api/client.rb', line 31 def episode @episode ||= ThetvdbApi::Episode.new(config) end |
#search ⇒ Object
11 12 13 |
# File 'lib/thetvdb_api/client.rb', line 11 def search @search ||= ThetvdbApi::Search.new(config) end |
#series ⇒ Object
15 16 17 |
# File 'lib/thetvdb_api/client.rb', line 15 def series @series ||= ThetvdbApi::Series.new(config) end |
#server ⇒ Object
23 24 25 |
# File 'lib/thetvdb_api/client.rb', line 23 def server @server ||= ThetvdbApi::Server.new(config) end |
#update ⇒ Object
35 36 37 |
# File 'lib/thetvdb_api/client.rb', line 35 def update @update ||= ThetvdbApi::Update.new(config) end |