Class: FanartApi::Base
- Inherits:
-
Object
- Object
- FanartApi::Base
- Includes:
- HTTParty
- Defined in:
- lib/fanart_api/base.rb
Instance Method Summary collapse
- #api_key ⇒ Object
-
#initialize(client) ⇒ Base
constructor
A new instance of Base.
- #shared_uri(id, type, sort, limit) ⇒ Object
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_key ⇒ Object
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 |