Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
appointment_plus / lib / appointment_plus / connection.rb
Size: Mime:
require 'faraday_middleware'
Dir[File.expand_path('../../faraday/*.rb', __FILE__)].each{|f| require f}

module AppointmentPlus
  module Connection
    private

    def connection
      options = {
        :url => "#{endpoint}",
      }

      Faraday::Connection.new(options) do |connection|
        connection.use FaradayMiddleware::Mashify
        connection.use Faraday::Response::ParseJson
        connection.basic_auth(site_id, api_key)
        connection.adapter(adapter)
        connection.response :logger if logging
      end
    end
  end
end