Class: DownloadVideos
- Inherits:
-
RequestBase
- Object
- RequestBase
- DownloadVideos
- Defined in:
- lib/Downloads/DownloadVideos.rb
Constant Summary collapse
- API_ROUTE =
"/v3/downloads/videos"
- QUERY_PARAM_NAMES =
["product_id","size"]
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/DownloadVideos.rb', line 5 def asset_id @asset_id end |
Instance Method Details
#execute ⇒ Object
23 24 25 26 27 |
# File 'lib/Downloads/DownloadVideos.rb', line 23 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
18 19 20 21 |
# File 'lib/Downloads/DownloadVideos.rb', line 18 def with_id(asset_id) self.asset_id = asset_id return self end |