Class: GigaChat::Configuration

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

Constant Summary collapse

DEFAULT_API_VERSION =
"v1".freeze
DEFAULT_URI_BASE =
"https://gigachat.devices.sberbank.ru/api/".freeze
DEFAULT_AUTH_UURL =
"https://ngw.devices.sberbank.ru:9443/api/v2/oauth".freeze
DEFAULT_REQUEST_TIMEOUT =
120
DEFAULT_LOG_ERRORS =
false

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



42
43
44
45
46
47
48
49
50
51
# File 'lib/gigachat.rb', line 42

def initialize
  @api_type = nil # GIGACHAT_API_PERS, GIGACHAT_API_B2B, GIGACHAT_API_CORP
  @api_version = DEFAULT_API_VERSION
  @log_errors = DEFAULT_LOG_ERRORS
  @client_base64 = nil
  @uri_base = DEFAULT_URI_BASE
  @uri_auth = DEFAULT_AUTH_UURL
  @request_timeout = DEFAULT_REQUEST_TIMEOUT
  @extra_headers = {}
end

Instance Attribute Details

#api_typeObject

Returns the value of attribute api_type.



27
28
29
# File 'lib/gigachat.rb', line 27

def api_type
  @api_type
end

#api_versionObject

Returns the value of attribute api_version.



27
28
29
# File 'lib/gigachat.rb', line 27

def api_version
  @api_version
end

#client_base64Object

Returns the value of attribute client_base64.



27
28
29
# File 'lib/gigachat.rb', line 27

def client_base64
  @client_base64
end

#extra_headersObject

Returns the value of attribute extra_headers.



27
28
29
# File 'lib/gigachat.rb', line 27

def extra_headers
  @extra_headers
end

#log_errorsObject

Returns the value of attribute log_errors.



27
28
29
# File 'lib/gigachat.rb', line 27

def log_errors
  @log_errors
end

#request_timeoutObject

Returns the value of attribute request_timeout.



27
28
29
# File 'lib/gigachat.rb', line 27

def request_timeout
  @request_timeout
end

#uri_authObject

Returns the value of attribute uri_auth.



27
28
29
# File 'lib/gigachat.rb', line 27

def uri_auth
  @uri_auth
end

#uri_baseObject

Returns the value of attribute uri_base.



27
28
29
# File 'lib/gigachat.rb', line 27

def uri_base
  @uri_base
end