Class: Images

Inherits:
RequestBase show all
Defined in:
lib/Images/Images.rb

Constant Summary collapse

API_ROUTE =
"/v3/images"
QUERY_PARAM_NAMES =
["ids","fields"]

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/Images/Images.rb', line 5

def asset_id
  @asset_id
end

Instance Method Details

#executeObject



25
26
27
28
# File 'lib/Images/Images.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/Images/Images.rb', line 18

def with_id(id)
       self.asset_id = id
	return self
end