Class: DeepL::Requests::Base
- Inherits:
-
Object
- Object
- DeepL::Requests::Base
- Defined in:
- lib/deepl/requests/base.rb
Overview
rubocop:disable Metrics/ClassLength
Direct Known Subclasses
Document::Download, Document::GetStatus, Document::Upload, Glossary::Create, Glossary::Destroy, Glossary::Entries, Glossary::Find, Glossary::LanguagePairs, Glossary::List, Languages, Translate, Usage
Instance Attribute Summary collapse
-
#api ⇒ Object
readonly
Returns the value of attribute api.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
- #details ⇒ Object
-
#initialize(api, options = {}, additional_headers = {}) ⇒ Base
constructor
A new instance of Base.
- #request ⇒ Object
Constructor Details
#initialize(api, options = {}, additional_headers = {}) ⇒ Base
Returns a new instance of Base.
11 12 13 14 15 16 17 |
# File 'lib/deepl/requests/base.rb', line 11 def initialize(api, = {}, additional_headers = {}) @api = api @options = @additional_headers = additional_headers @num_retries = 0 @backoff_timer = Utils::BackoffTimer.new end |
Instance Attribute Details
#api ⇒ Object (readonly)
Returns the value of attribute api.
9 10 11 |
# File 'lib/deepl/requests/base.rb', line 9 def api @api end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
9 10 11 |
# File 'lib/deepl/requests/base.rb', line 9 def @options end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
9 10 11 |
# File 'lib/deepl/requests/base.rb', line 9 def response @response end |
Instance Method Details
#details ⇒ Object
23 24 25 |
# File 'lib/deepl/requests/base.rb', line 23 def details "HTTP Headers #{headers}" end |
#request ⇒ Object
19 20 21 |
# File 'lib/deepl/requests/base.rb', line 19 def request raise NotImplementedError end |