Class: FanartApi::Base

Inherits:
Object
  • Object
show all
Includes:
ServiceApi::BaseFaraday
Defined in:
lib/fanart_api/base.rb

Direct Known Subclasses

Movie, Music, Tv

Instance Method Summary collapse

Instance Method Details

#api_key_optionsObject



6
7
8
# File 'lib/fanart_api/base.rb', line 6

def api_key_options
  { api_key: @client.options[:api_key] }
end

#find_pathObject



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

def find_path
  ':kind/:id'
end

#latest_pathObject



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

def latest_path
  ':kind/latest'
end

#path_with_params(path, options) ⇒ Object



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

def path_with_params(path, options)
  path(path).params(api_key_options.merge(options))
end