Module: ArmoryApi::Default

Defined in:
lib/armory_api/default.rb

Constant Summary collapse

REGION =
'us'
LOCALE =
'en_US'
CONNECTION_OPTIONS =
{
  headers: {
    user_agent: "ArmoryApi Ruby Gem (#{ArmoryApi::Version})"
  },
  raw: true,
  timeout: 10
}
MIDDLEWARE =
Faraday::Builder.new(
  &Proc.new do |builder|
    builder.adapter Faraday.default_adapter
  end
)

Class Method Summary collapse

Class Method Details

.connection_optionsObject



36
37
38
# File 'lib/armory_api/default.rb', line 36

def connection_options
  CONNECTION_OPTIONS
end

.localeObject



32
33
34
# File 'lib/armory_api/default.rb', line 32

def locale
  LOCALE
end

.middlewareObject



40
41
42
# File 'lib/armory_api/default.rb', line 40

def middleware
  MIDDLEWARE
end

.optionsHash

Returns:

  • (Hash)


24
25
26
# File 'lib/armory_api/default.rb', line 24

def options
  Hash[ArmoryApi::Configurable.keys.each.map{|k| [k, send(k)]}]
end

.regionObject



28
29
30
# File 'lib/armory_api/default.rb', line 28

def region
  REGION
end