Class: FanartApi::Base
- Inherits:
-
Object
- Object
- FanartApi::Base
- Includes:
- ServiceApi::BaseFaraday
- Defined in:
- lib/fanart_api/base.rb
Instance Method Summary collapse
- #api_key_options ⇒ Object
- #default_options ⇒ Object
- #find_path ⇒ Object
- #path_with_params(path, options) ⇒ Object
- #update_path ⇒ Object
Instance Method Details
#api_key_options ⇒ Object
6 7 8 |
# File 'lib/fanart_api/base.rb', line 6 def { api_key: @client.[:api_key] } end |
#default_options ⇒ Object
22 23 24 25 26 27 28 |
# File 'lib/fanart_api/base.rb', line 22 def { type: 'all', sort: 1, limit: 2 } end |
#find_path ⇒ Object
14 15 16 |
# File 'lib/fanart_api/base.rb', line 14 def find_path ':kind/:api_key/:id/json/:type/:sort/:limit' end |
#path_with_params(path, options) ⇒ Object
10 11 12 |
# File 'lib/fanart_api/base.rb', line 10 def path_with_params(path, ) path(path).params(.merge()) end |
#update_path ⇒ Object
18 19 20 |
# File 'lib/fanart_api/base.rb', line 18 def update_path ':kind/:api_key/:timestamp' end |