Class: Videos
- Inherits:
-
RequestBase
- Object
- RequestBase
- Videos
- Defined in:
- lib/Videos/Videos.rb
Constant Summary collapse
- API_ROUTE =
"/v3/videos"
- QUERY_PARAM_NAMES =
["ids","fields"]
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/Videos/Videos.rb', line 5 def asset_id @asset_id end |
Instance Method Details
#execute ⇒ Object
25 26 27 28 |
# File 'lib/Videos/Videos.rb', line 25 def execute self.asset_id.nil? ? uri = API_ROUTE : uri = API_ROUTE + "/" + self.asset_id return @http_helper.get(uri, @query_params, @headers) end |
#with_id(id) ⇒ Object
18 19 20 21 |
# File 'lib/Videos/Videos.rb', line 18 def with_id(id) self.asset_id = id return self end |