Method: Orchestrate::Client#list_refs

Defined in:
lib/orchestrate/client.rb

#list_refs(collection, key, options = {}) ⇒ Object

List historical refs for values of a key. Results are time-ordered newest-to-oldest and paginated.

Parameters:

  • collection (#to_s)

    The name of the collection.

  • key (#to_s)

    The name of the key.

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

    Parameters for the query.

Options Hash (options):

  • :limit (Integer) — default: 10

    The number of results to return. Maximum 100.

  • :offset (Integer) — default: 0

    The starting position of the results.

  • :values (true, false) — default: false

    Whether to return the value for each ref. Refs with no content (for example, deleted with #delete) will not have a value, but marked with a 'tombstone' => true key.

Returns:

  • Orchestrate::API::CollectionResponse

Raises:

  • Orchestrate::API::NotFound If there are no values for the provided key/collection.

  • Orchestrate::API::InvalidSearchParam The :limit/:offset values are not valid.

  • Orchestrate::API::MalformedRef If the ref provided is not a valid ref.

[View source]

120
121
122
# File 'lib/orchestrate/client.rb', line 120

def list_refs(collection, key, options={})
  send_request :get, [collection, key, :refs], { query: options, response: API::CollectionResponse }
end