Class: InfluxDB2::DefaultApi
- Inherits:
-
Object
- Object
- InfluxDB2::DefaultApi
- Defined in:
- lib/influxdb2/client/default_api.rb
Overview
default api
Constant Summary collapse
- DEFAULT_TIMEOUT =
10
- DEFAULT_REDIRECT_COUNT =
10
- HEADER_CONTENT_TYPE =
'Content-Type'.freeze
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(options:) ⇒ DefaultApi
constructor
A new instance of DefaultApi.
- #log(level, message) ⇒ Object
Constructor Details
#initialize(options:) ⇒ DefaultApi
Returns a new instance of DefaultApi.
32 33 34 35 36 |
# File 'lib/influxdb2/client/default_api.rb', line 32 def initialize(options:) @options = @max_redirect_count = @options[:max_redirect_count] || DEFAULT_REDIRECT_COUNT @logging_helper = LoggingHelper.new(@options[:logger]) end |
Class Method Details
.create_logger ⇒ Object
42 43 44 |
# File 'lib/influxdb2/client/default_api.rb', line 42 def self.create_logger Logger.new(STDOUT) end |
Instance Method Details
#log(level, message) ⇒ Object
38 39 40 |
# File 'lib/influxdb2/client/default_api.rb', line 38 def log(level, ) @logging_helper.log(level, ) end |