Class: DeepL::API Private

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

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

The configuration and HTTP connection of one DeepL::Client or DeepL::AdminClient.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(configuration, http_client_options = nil) ⇒ API

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of API.



12
13
14
15
16
17
18
19
20
# File 'lib/deepl/api.rb', line 12

def initialize(configuration, http_client_options = nil)
  @configuration = configuration
  @http_client_options = http_client_options
  @http_client = if http_client_options
                   Utils::HTTPClientBuilder.build(configuration.host, http_client_options)
                 else
                   default_http_client(configuration.host)
                 end
end

Instance Attribute Details

#configuration ⇒ Object (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



10
11
12
# File 'lib/deepl/api.rb', line 10

def configuration
  @configuration
end

#http_client ⇒ Object (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



10
11
12
# File 'lib/deepl/api.rb', line 10

def http_client
  @http_client
end

#http_client_options ⇒ Object (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



10
11
12
# File 'lib/deepl/api.rb', line 10

def http_client_options
  @http_client_options
end