Class: FanartApi::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/fanart_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
# File 'lib/fanart_api/client.rb', line 4

def initialize(options = {})
  @options = options

  @options[:adapter] ||= :net_http
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



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

def options
  @options
end

Instance Method Details

#movieObject



10
11
12
# File 'lib/fanart_api/client.rb', line 10

def movie
  @movie ||= FanartApi::Movie.new(self)
end

#musicObject



14
15
16
# File 'lib/fanart_api/client.rb', line 14

def music
  @music ||= FanartApi::Music.new(self)
end

#tvObject



18
19
20
# File 'lib/fanart_api/client.rb', line 18

def tv
  @tv ||= FanartApi::Tv.new(self)
end