Class: FanartApi::Client
- Inherits:
-
Object
- Object
- FanartApi::Client
- Defined in:
- lib/fanart_api/client.rb
Instance Attribute Summary collapse
-
#api_key ⇒ Object
readonly
Returns the value of attribute api_key.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Client
constructor
A new instance of Client.
- #movie ⇒ Object
- #music ⇒ Object
- #tv ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Client
Returns a new instance of Client.
6 7 8 |
# File 'lib/fanart_api/client.rb', line 6 def initialize( = {}) @api_key = [:api_key] ? [:api_key] : FanartApi::Configuration.api_key end |
Instance Attribute Details
#api_key ⇒ Object (readonly)
Returns the value of attribute api_key.
4 5 6 |
# File 'lib/fanart_api/client.rb', line 4 def api_key @api_key end |
Instance Method Details
#movie ⇒ Object
10 11 12 |
# File 'lib/fanart_api/client.rb', line 10 def movie @movie ||= FanartApi::Movie.new(self) end |
#music ⇒ Object
14 15 16 |
# File 'lib/fanart_api/client.rb', line 14 def music @music ||= FanartApi::Music.new(self) end |
#tv ⇒ Object
18 19 20 |
# File 'lib/fanart_api/client.rb', line 18 def tv @tv ||= FanartApi::Tv.new(self) end |