Class: MC2P::ReadOnlyResourceMixin
- Inherits:
-
DetailOnlyResourceMixin
- Object
- ResourceMixin
- DetailOnlyResourceMixin
- MC2P::ReadOnlyResourceMixin
- Defined in:
- lib/mixins.rb
Overview
Allows send requests of list and detail
Instance Method Summary collapse
-
#list(abs_url = nil) ⇒ Object
- Params:
abs_url -
if is passed the request is sent to this url Returns: a paginator class with the response of the server.
- Params:
Methods inherited from DetailOnlyResourceMixin
Methods inherited from ResourceMixin
#_one_item, #detail_url, #initialize
Constructor Details
This class inherits a constructor from MC2P::ResourceMixin
Instance Method Details
#list(abs_url = nil) ⇒ Object
Params:
abs_url-
if is passed the request is sent to this url
Returns: a paginator class with the response of the server
256 257 258 259 260 261 262 263 264 |
# File 'lib/mixins.rb', line 256 def list(abs_url = nil) json_dict = @api_request.get( abs_url.nil? ? @path : nil, nil, abs_url, self ) @paginator_class.new(json_dict, @object_item_class, self) end |