Method: TranslatorText::Client#initialize

Defined in:
lib/translator_text/client.rb

#initialize(api_key, api_region = nil) ⇒ Client

Initialize the client

Parameters:

  • api_key (String)

    the Cognitive Services API Key

  • api_region (String) (defaults to: nil)

    the Cognitive Services API Region

Since:

  • 1.0.0



26
27
28
29
# File 'lib/translator_text/client.rb', line 26

def initialize(api_key, api_region = nil)
  @api_key = api_key
  @api_region = api_region
end