Class: GigaChat::Configuration
- Inherits:
-
Object
- Object
- GigaChat::Configuration
- 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
-
#api_type ⇒ Object
Returns the value of attribute api_type.
-
#api_version ⇒ Object
Returns the value of attribute api_version.
-
#client_base64 ⇒ Object
Returns the value of attribute client_base64.
-
#extra_headers ⇒ Object
Returns the value of attribute extra_headers.
-
#log_errors ⇒ Object
Returns the value of attribute log_errors.
-
#request_timeout ⇒ Object
Returns the value of attribute request_timeout.
-
#uri_auth ⇒ Object
Returns the value of attribute uri_auth.
-
#uri_base ⇒ Object
Returns the value of attribute uri_base.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
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_type ⇒ Object
Returns the value of attribute api_type.
27 28 29 |
# File 'lib/gigachat.rb', line 27 def api_type @api_type end |
#api_version ⇒ Object
Returns the value of attribute api_version.
27 28 29 |
# File 'lib/gigachat.rb', line 27 def api_version @api_version end |
#client_base64 ⇒ Object
Returns the value of attribute client_base64.
27 28 29 |
# File 'lib/gigachat.rb', line 27 def client_base64 @client_base64 end |
#extra_headers ⇒ Object
Returns the value of attribute extra_headers.
27 28 29 |
# File 'lib/gigachat.rb', line 27 def extra_headers @extra_headers end |
#log_errors ⇒ Object
Returns the value of attribute log_errors.
27 28 29 |
# File 'lib/gigachat.rb', line 27 def log_errors @log_errors end |
#request_timeout ⇒ Object
Returns the value of attribute request_timeout.
27 28 29 |
# File 'lib/gigachat.rb', line 27 def request_timeout @request_timeout end |
#uri_auth ⇒ Object
Returns the value of attribute uri_auth.
27 28 29 |
# File 'lib/gigachat.rb', line 27 def uri_auth @uri_auth end |
#uri_base ⇒ Object
Returns the value of attribute uri_base.
27 28 29 |
# File 'lib/gigachat.rb', line 27 def uri_base @uri_base end |