Method: Talis::Hierarchy::Node.parents

Defined in:
lib/talis/hierarchy/node.rb

.parents(request_id: new_req_id, namespace:, type:, id:, opts: {}) ⇒ Object

Fetch all parents belonging to the specified node from the hierarchy for the given namespace.

Parameters:

  • request_id (String) (defaults to: new_req_id)

    (‘uuid’) unique ID for the remote request.

  • namespace (String)

    the namespace of the hierarchy.

  • type (String)

    the type of node whose parents are to be fetched.

  • id (String)

    the ID of the node whose parents are to be fetched.

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

Returns:

  • BlueprintClient::Node or nil if the node cannot be found.

Raises:



84
85
86
87
88
# File 'lib/talis/hierarchy/node.rb', line 84

def parents(request_id: new_req_id, namespace:, type:, id:, opts: {})
  api_client(request_id).get_parents(id, namespace, type, opts).data
rescue BlueprintClient::ApiError => error
  handle_response(error)
end