Class: InfluxDB2::DefaultApi

Inherits:
Object
  • Object
show all
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

Constructor Details

#initialize(options:) ⇒ DefaultApi

Returns a new instance of DefaultApi.

Parameters:

  • options (Hash)

    The options to be used by the client.



32
33
34
35
36
# File 'lib/influxdb2/client/default_api.rb', line 32

def initialize(options:)
  @options = options
  @max_redirect_count = @options[:max_redirect_count] || DEFAULT_REDIRECT_COUNT
  @logging_helper = LoggingHelper.new(@options[:logger])
end

Class Method Details

.create_loggerObject



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, message)
  @logging_helper.log(level, message)
end