Class: DeepL::Requests::TranslationMemory::StorageBase
- Defined in:
- lib/deepl/requests/translation_memory/storage_base.rb
Overview
Common behaviour of the requests to a pre-signed storage URL handed out by the API, such
as a translation memory upload or download URL. Those URLs point outside of the DeepL
API, so they are requested over their own connection and the DeepL Authorization header
is deliberately not sent.
Direct Known Subclasses
Constant Summary
Constants inherited from Base
Instance Attribute Summary collapse
-
#storage_url ⇒ Object
readonly
Returns the value of attribute storage_url.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(api, storage_url, options = {}, additional_headers = {}) ⇒ StorageBase
constructor
A new instance of StorageBase.
Methods inherited from Base
Constructor Details
#initialize(api, storage_url, options = {}, additional_headers = {}) ⇒ StorageBase
Returns a new instance of StorageBase.
18 19 20 21 22 23 24 25 |
# File 'lib/deepl/requests/translation_memory/storage_base.rb', line 18 def initialize(api, storage_url, = {}, additional_headers = {}) super(api, , additional_headers) if storage_url.nil? || storage_url.empty? raise Exceptions::Error, 'Storage URL must not be empty' end @storage_url = storage_url end |
Instance Attribute Details
#storage_url ⇒ Object (readonly)
Returns the value of attribute storage_url.
16 17 18 |
# File 'lib/deepl/requests/translation_memory/storage_base.rb', line 16 def storage_url @storage_url end |