Class: FanartApi::Base

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

Direct Known Subclasses

Movie, Music, Tv

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Base

Returns a new instance of Base.



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

def initialize(client)
  @client = client
end

Instance Method Details

#api_keyObject



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

def api_key
  @client.api_key
end

#shared_uri(id, type, sort, limit) ⇒ Object



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

def shared_uri(id, type, sort, limit)
  "/#{api_key}/#{id}/json/#{type}/#{sort}/#{limit}"
end