Class: BibleSearch::APIInterface
- Inherits:
-
Object
- Object
- BibleSearch::APIInterface
- Includes:
- HTTParty, Singleton
- Defined in:
- lib/biblesearch-api/api_interface.rb
Instance Attribute Summary collapse
-
#api_key ⇒ Object
Returns the value of attribute api_key.
Instance Method Summary collapse
-
#initialize(api_key, base_uri = 'bibles.org/v2') ⇒ APIInterface
constructor
A new instance of APIInterface.
Constructor Details
#initialize(api_key, base_uri = 'bibles.org/v2') ⇒ APIInterface
Returns a new instance of APIInterface.
12 13 14 15 |
# File 'lib/biblesearch-api/api_interface.rb', line 12 def initialize(api_key, base_uri = 'bibles.org/v2') self.class.base_uri base_uri self.class.basic_auth(@api_key = api_key, 'X') end |
Instance Attribute Details
#api_key ⇒ Object
Returns the value of attribute api_key.
11 12 13 |
# File 'lib/biblesearch-api/api_interface.rb', line 11 def api_key @api_key end |