Class: OpenfigiRuby::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/openfigi_ruby/configuration.rb

Overview

Holds configuration for the gem. Set values via configure.

Constant Summary collapse

BASE_URL =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

OpenFIGI V3 API base URL.

"https://api.openfigi.com/v3"

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



19
20
21
22
23
# File 'lib/openfigi_ruby/configuration.rb', line 19

def initialize
  @api_key = nil
  @open_timeout = 10
  @read_timeout = 30
end

Instance Attribute Details

#api_keyString?

Returns OpenFIGI API key. Without a key, stricter rate limits apply.

Returns:

  • (String, nil)

    OpenFIGI API key. Without a key, stricter rate limits apply.



12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/openfigi_ruby/configuration.rb', line 12

class Configuration
  # OpenFIGI V3 API base URL.
  # @api private
  BASE_URL = "https://api.openfigi.com/v3"

  attr_accessor :api_key, :open_timeout, :read_timeout

  def initialize
    @api_key = nil
    @open_timeout = 10
    @read_timeout = 30
  end
end

#open_timeoutInteger

Returns seconds to wait when opening a connection (default: 10).

Returns:

  • (Integer)

    seconds to wait when opening a connection (default: 10)



12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/openfigi_ruby/configuration.rb', line 12

class Configuration
  # OpenFIGI V3 API base URL.
  # @api private
  BASE_URL = "https://api.openfigi.com/v3"

  attr_accessor :api_key, :open_timeout, :read_timeout

  def initialize
    @api_key = nil
    @open_timeout = 10
    @read_timeout = 30
  end
end

#read_timeoutInteger

Returns seconds to wait for a response (default: 30).

Returns:

  • (Integer)

    seconds to wait for a response (default: 30)



12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/openfigi_ruby/configuration.rb', line 12

class Configuration
  # OpenFIGI V3 API base URL.
  # @api private
  BASE_URL = "https://api.openfigi.com/v3"

  attr_accessor :api_key, :open_timeout, :read_timeout

  def initialize
    @api_key = nil
    @open_timeout = 10
    @read_timeout = 30
  end
end