Sha256: 9c00aeb3520860b228c0497608897eb292e1cfa930cdf0653b94d326448de4be

Contents?: true

Size: 524 Bytes

Versions: 7

Compression:

Stored size: 524 Bytes

Contents

require 'faraday_middleware'

module HackerNewsSearch
  class Client
    module Connection
      private

      def connection
        Faraday.new(:url => 'http://api.thriftdb.com/api.hnsearch.com/') 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
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
hacker_news_search-0.0.7 lib/hacker_news_search/client/connection.rb
hacker_news_search-0.0.6 lib/hacker_news_search/client/connection.rb
hacker_news_search-0.0.5 lib/hacker_news_search/client/connection.rb
hacker_news_search-0.0.4 lib/hacker_news_search/client/connection.rb
hacker_news_search-0.0.3 lib/hacker_news_search/client/connection.rb
hacker_news_search-0.0.2 lib/hacker_news_search/client/connection.rb
hacker_news_search-0.0.1 lib/hacker_news_search/client/connection.rb