Class: Brazify::Client
- Inherits:
-
Object
- Object
- Brazify::Client
- Defined in:
- lib/brazify/client.rb
Instance Method Summary collapse
- #connection ⇒ Object
-
#initialize(config: Brazify.config) ⇒ Client
constructor
A new instance of Client.
Constructor Details
Instance Method Details
#connection ⇒ Object
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/brazify/client.rb', line 10 def connection @connection ||= Faraday.new(config.base_url) do |conn| conn.request config.format conn.request :authorization, 'Bearer', config.api_key conn.response config.format, content_type: 'application/json' conn.[:timeout] = config.timeout conn.[:open_timeout] = config.open_timeout end end |