Class: LoopsSdk::Configuration
- Inherits:
-
Object
- Object
- LoopsSdk::Configuration
- Defined in:
- lib/loops_sdk/configuration.rb
Instance Attribute Summary collapse
-
#api_key ⇒ Object
Returns the value of attribute api_key.
Instance Method Summary collapse
Instance Attribute Details
#api_key ⇒ Object
Returns the value of attribute api_key.
7 8 9 |
# File 'lib/loops_sdk/configuration.rb', line 7 def api_key @api_key end |
Instance Method Details
#connection ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/loops_sdk/configuration.rb', line 9 def connection @connection ||= Faraday.new(url: "https://app.loops.so/api/") do |faraday| faraday.adapter Faraday.default_adapter faraday.headers["Authorization"] = "Bearer #{api_key}" faraday.headers["Content-Type"] = "application/json" end end |