lib/purl_fetcher/client/unpublish.rb in purl_fetcher-client-1.5.2 vs lib/purl_fetcher/client/unpublish.rb in purl_fetcher-client-1.5.3
- old
+ new
@@ -3,10 +3,11 @@
module PurlFetcher
class Client
# Delete an item from the purl-fetcher cache
class Unpublish
# @param [String] druid the identifier of the item
+ # @raise [Purl::Fetcher::Client::AlreadyDeletedResponseError] if the item is already deleted
def self.unpublish(druid:)
new(druid:).unpublish
end
# @param [String] druid the identifier of the item
@@ -16,9 +17,10 @@
def unpublish
logger.debug("Starting a unpublish request for: #{druid}")
response = client.delete(path:)
logger.debug("Unpublish request complete")
+ response
end
private
attr_reader :druid