Class: DownloadImages
- Inherits:
-
RequestBase
- Object
- RequestBase
- DownloadImages
- Defined in:
- lib/Downloads/DownloadImages.rb
Constant Summary collapse
- API_ROUTE =
"/v3/downloads/images"
- QUERY_PARAM_NAMES =
["file_type","height","product_id","product_type"]
Instance Attribute Summary collapse
-
#asset_id ⇒ Object
Returns the value of attribute asset_id.
Attributes inherited from RequestBase
#headers, #http_helper, #query_params
Instance Method Summary collapse
Methods inherited from RequestBase
#initialize, #with_accept_language, #with_custom_header, #with_custom_parameter
Constructor Details
This class inherits a constructor from RequestBase
Instance Attribute Details
#asset_id ⇒ Object
Returns the value of attribute asset_id.
5 6 7 |
# File 'lib/Downloads/DownloadImages.rb', line 5 def asset_id @asset_id end |
Instance Method Details
#execute ⇒ Object
26 27 28 29 30 |
# File 'lib/Downloads/DownloadImages.rb', line 26 def execute build_query_params("auto_download", "false") uri = API_ROUTE + "/" + self.asset_id return @http_helper.post(uri, @query_params, nil, @headers) end |
#with_id(asset_id) ⇒ Object
21 22 23 24 |
# File 'lib/Downloads/DownloadImages.rb', line 21 def with_id(asset_id) self.asset_id = asset_id return self end |