Module: Yext::Api::Concerns::FaradayConnection
- Extended by:
- ActiveSupport::Concern
- Included in:
- Utils::ApiBase
- Defined in:
- lib/yext/api/concerns/faraday_connection.rb
Overview
This module defines methods that set the connection for a Spyke class.
The default connection is to the sandbox or the API based on the value of the configuration sandbox setting.
A class function live_api is provided to allow LiveApi module classes to use the live endpoint.
Class Method Summary collapse
Class Method Details
.faraday_connection(url) ⇒ Object
31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/yext/api/concerns/faraday_connection.rb', line 31 def self.faraday_connection(url) Faraday.new(url: url) do |c| c.request :json c.use Yext::Api::Utils::ResponseParser c.use Yext::Api::Utils::DefaultParameters c.use Yext::Api::Utils::ApiRateLimits c.adapter Faraday.default_adapter end end |