Class: DeepL::Requests::Languages

Inherits:
Base
  • Object
show all
Defined in:
lib/deepl/requests/languages.rb

Constant Summary

Constants inherited from Base

Base::MAX_GLOSSARY_IDS, Base::NETWORK_ERRORS, Base::RESPONSE_FORMAT_ERRORS, Base::RETRYABLE_NETWORK_ERRORS, Base::TECHNICAL_HEADERS

Instance Attribute Summary

Attributes inherited from Base

#api, #options, #response

Instance Method Summary collapse

Methods inherited from Base

accepted_options, accepts_options, #details, inherited, validate_options!

Constructor Details

#initialize(api, type) ⇒ Languages

type is :source or :target.



10
11
12
13
# File 'lib/deepl/requests/languages.rb', line 10

def initialize(api, type)
  super(api, {})
  @type = type
end

Instance Method Details

#request ⇒ Object



15
16
17
# File 'lib/deepl/requests/languages.rb', line 15

def request
  build_languages(*execute_request_with_retries(get_request))
end

#to_s ⇒ Object



19
20
21
# File 'lib/deepl/requests/languages.rb', line 19

def to_s
  "GET #{uri.request_uri}"
end