Method: Orchestrate::Client#get

Defined in:
lib/orchestrate/client.rb

#get(collection, key, ref = nil) ⇒ Object

Parameters:

  • collection (#to_s)

    The name of the collection.

  • key (#to_s)

    The name of the key.

  • ref (#to_s) (defaults to: nil)

    The opaque version identifier of the ref to return, if a historical value is desired.

Returns:

  • Orchestrate::API::ItemResponse

Raises:

  • Orchestrate::API::NotFound If the key or ref doesn't exist.

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

[View source]

100
101
102
103
104
# File 'lib/orchestrate/client.rb', line 100

def get(collection, key, ref=nil)
  path = [collection, key]
  path.concat(['refs', ref]) if ref
  send_request :get, path, { response: API::ItemResponse }
end