Sha256: 486f47947d73529d3733c980e6facde8d84089f6df9562a1752dcce7411eadc0
Contents?: true
Size: 478 Bytes
Versions: 1
Compression:
Stored size: 478 Bytes
Contents
module AbsorbApi class Api attr_reader :connection, :token def initialize @token = AbsorbApi::Authorize.new.token @connection ||= Faraday.new(url: AbsorbApi.configuration.url, parallel_manager: Typhoeus::Hydra.new(max_concurrency: 200)) do |faraday| faraday.request :json faraday.response :json, content_type: /\bjson$/ faraday.adapter :typhoeus faraday.headers = { 'Authorization' => @token } end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
absorb_api-0.2.0 | lib/absorb_api/api.rb |