class FanartApi::Base

Public Instance Methods

api_key_options() click to toggle source
# File lib/fanart_api/base.rb, line 6
def api_key_options
  { api_key: @config[:api_key] }
end
find_path() click to toggle source
# File lib/fanart_api/base.rb, line 14
def find_path
  ':kind/:id'
end
latest_path() click to toggle source
# File lib/fanart_api/base.rb, line 18
def latest_path
  ':kind/latest'
end
path_with_params(path, options) click to toggle source
# File lib/fanart_api/base.rb, line 10
def path_with_params(path, options)
  path(path).params(api_key_options.merge(options))
end

Private Instance Methods

base_url() click to toggle source
# File lib/fanart_api/base.rb, line 28
def base_url
  if @config[:proxy_url]
    @config[:proxy_url]
  else
    'http://webservice.fanart.tv/v3/'
  end
end
uri_kind() click to toggle source
# File lib/fanart_api/base.rb, line 24
def uri_kind
  :colon
end