Class: OpenfigiRuby::Configuration
- Inherits:
-
Object
- Object
- OpenfigiRuby::Configuration
- 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
-
#api_key ⇒ String?
OpenFIGI API key.
-
#open_timeout ⇒ Integer
Seconds to wait when opening a connection (default: 10).
-
#read_timeout ⇒ Integer
Seconds to wait for a response (default: 30).
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
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_key ⇒ String?
Returns 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_timeout ⇒ Integer
Returns 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_timeout ⇒ Integer
Returns 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 |