lib/preservation/client/objects.rb in preservation-client-3.2.0 vs lib/preservation/client/objects.rb in preservation-client-3.2.1

- old
+ new

@@ -69,9 +69,17 @@ # @param [String] version - the version of the file requested (defaults to nil for latest version) def metadata(druid:, filepath:, version: nil) file(druid, 'metadata', filepath, version) end + # retrieve the storage location for the primary moab of the given druid + # @param [String] druid - with or without prefix: 'druid:ab123cd4567' or 'ab123cd4567' + # @return [String] the storage location of the primary moab for the given druid + # @raise [Preservation::Client::NotFoundError] when druid is not found + def primary_moab_location(druid:) + get("objects/#{druid}/primary_moab_location", {}, on_data: nil) + end + # convenience method for retrieving latest Moab::SignatureCatalog from a Moab object, # @param [String] druid - with or without prefix: 'druid:ab123cd4567' OR 'ab123cd4567' # @return [Moab::SignatureCatalog] the manifest of all files previously ingested def signature_catalog(druid) Moab::SignatureCatalog.parse manifest(druid: druid, filepath: 'signatureCatalog.xml')