Method: Orchestrate::Client#list

Defined in:
lib/orchestrate/client.rb

#list(collection, options = {}) ⇒ Object

Note:

The Orchestrate API may return an error if you include both the :start/:after or :before/:end keys. The client will not stop you from doing this.

Note:

To include all keys in a collection, do not include any :start/:after/:before/:end parameters.

List the KeyValue items in a collection. Results are sorted results lexicographically by key name and paginated.

Parameters:

  • collection (#to_s)

    The name of the collection

  • options (Hash) (defaults to: {})

    Parameters for the query

Options Hash (options):

  • :limit (Integer) — default: 10

    The number of results to return. Maximum 100.

  • :start (String)

    The inclusive start key of the query range.

  • :after (String)

    The exclusive start key of the query range.

  • :before (String)

    The exclusive end key of the query range.

  • :end (String)

    The inclusive end key of the query range.

Returns:

  • Orchestrate::API::CollectionResponse

Raises:

  • Orchestrate::API::InvalidSearchParam The :limit value is not valid.


249
250
251
252
# File 'lib/orchestrate/client.rb', line 249

def list(collection, options={})
  API::Helpers.range_keys!('key', options)
  send_request :get, [collection], { query: options, response: API::CollectionResponse }
end