Sha256: d5190bc128eb30b124868e0349faa3188cee74d09ee509d106c0d6241ec01873

Contents?: true

Size: 511 Bytes

Versions: 8

Compression:

Stored size: 511 Bytes

Contents

require 'faraday_middleware'

module SilverPop
  # @private
  module Connection
    private

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

        conn.request :oauth2, @access_token
        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

8 entries across 8 versions & 1 rubygems

Version Path
silverpop-0.0.9 lib/silverpop/connection.rb
silverpop-0.0.8 lib/silverpop/connection.rb
silverpop-0.0.7 lib/silverpop/connection.rb
silverpop-0.0.6 lib/silverpop/connection.rb
silverpop-0.0.5 lib/silverpop/connection.rb
silverpop-0.0.4 lib/silverpop/connection.rb
silverpop-0.0.3 lib/silverpop/connection.rb
silverpop-0.0.2 lib/silverpop/connection.rb