Sha256: 074f74d98ce1f279cada3c4577f56036c03ade66b873cb729254f2f622726ac3

Contents?: true

Size: 534 Bytes

Versions: 4

Compression:

Stored size: 534 Bytes

Contents

require 'faraday_middleware'

module GoAcoustic
  # @private
  module Connection
    private

    def connection(options={})
      connection = Faraday.new @goacoustic_url do |conn|
        # Uncomment if want to log to stdout
        #conn.response :logger

        conn.request :oauth2, @access_token, token_type: :bearer
        conn.request :url_encoded
        conn.response :mashify

        conn.response :xml, :content_type => /\bxml$/
        conn.adapter Faraday.default_adapter
      end
      connection
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
goacoustic-0.1.4 lib/goacoustic/connection.rb
goacoustic-0.1.3 lib/goacoustic/connection.rb
goacoustic-0.1.2 lib/goacoustic/connection.rb
goacoustic-0.1.1 lib/goacoustic/connection.rb