Sha256: 1cb3019725b1827244756dc7b87da70b91a9a9af66d24c1efaad18c98e841af9

Contents?: true

Size: 464 Bytes

Versions: 2

Compression:

Stored size: 464 Bytes

Contents

require 'faraday_middleware'

module Rubykhan
  module Connection
    private

    def connection
      Faraday.new(:url => 'http://www.khanacademy.org/api/v1/') do |connection|
        connection.use Faraday::Request::UrlEncoded
        connection.use Faraday::Response::RaiseError
        connection.use Faraday::Response::Rashify
        connection.use Faraday::Response::ParseJson
        connection.adapter(Faraday.default_adapter)
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rubykhan-0.0.2 lib/rubykhan/connection.rb
rubykhan-0.0.1 lib/rubykhan/connection.rb