Sha256: b2b15afb4e97a96d211d02e3bad48e0a044c0e012ac579df0ffb1cc473950335
Contents?: true
Size: 522 Bytes
Versions: 2
Compression:
Stored size: 522 Bytes
Contents
module HH class Client include API DEFAULT_MIDDLEWARE = Proc.new do |conn| conn.request :json conn.response :json conn.adapter Faraday.default_adapter end def connection @connection ||= Faraday::Connection.new(:url => API_URL, :headers => default_headers, &DEFAULT_MIDDLEWARE) end private def default_headers headers = { :accept => 'application/json', :user_agent => "Ruby gem HH version #{HH::VERSION}" } end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
hh-0.0.2 | lib/hh/client.rb |
hh-0.0.1 | lib/hh/client.rb |