module ApiClient

High Level Namespace of the library ApiClient.

High Level Namespace of the library ApiClient.

Constants

VERSION

Version of the library.

Public Class Methods

config() click to toggle source

Global settings for ApiClient

@return [Hash] configuration attributes

# File lib/api-client.rb, line 29
def self.config
  @config
end
configure() { |config ||= configuration| ... } click to toggle source

Configures global settings

ApiClient.configure do |config|
  config.path = "api.example.com"
end

@yield Yield the configuration object @yieldparam block The Configuration object @yieldreturn [ApiClient::Configuration] The Configuration object

# File lib/api-client.rb, line 22
def self.configure(&block)
  yield @config ||= ApiClient::Configuration.new
end
parallel() { || ... } click to toggle source

Parallel api requisitions

@yield The requisitions to be made @yieldparam block A block with requisition objects @return [False] the value of the hydra config

# File lib/api-client.rb, line 38
def self.parallel(&block)
  raise Exceptions::NotPossible unless defined?(::Typhoeus)
  config.hydra = ::Typhoeus::Hydra.new
  yield
  config.hydra.run
  config.hydra = false
end