Method: SoftLayer::APIParameterFilter#result_limit
- Defined in:
- lib/softlayer/APIParameterFilter.rb
#result_limit(offset, limit) ⇒ Object
Adds a result limit which helps you page through a long list of entities
The offset is the index of the first item you wish to have returned The limit describes how many items you wish the call to return.
For example, if you wanted to get five open tickets from the account starting with the tenth item in the open tickets list you might call
account_service.result_limit(10, 5).getOpenTickets
104 105 106 107 108 |
# File 'lib/softlayer/APIParameterFilter.rb', line 104 def result_limit(offset, limit) # we create a new object in case the user wants to store off the # filter chain and reuse it later APIParameterFilter.new(self.target, @parameters.merge({ :result_offset => offset, :result_limit => limit })) end |