Class: DownloadImages

Inherits:
RequestBase show all
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

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_idObject

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

#executeObject



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