Class: PurlFetcher::Client::Publish
- Inherits:
-
Object
- Object
- PurlFetcher::Client::Publish
- Defined in:
- lib/purl_fetcher/client/publish.rb
Overview
Publish (metadata-only) to the purl cache
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(cocina:, file_uploads:, version:, version_date:, must_version:) ⇒ Publish
constructor
A new instance of Publish.
- #publish ⇒ Object
Constructor Details
#initialize(cocina:, file_uploads:, version:, version_date:, must_version:) ⇒ Publish
Returns a new instance of Publish.
16 17 18 19 20 21 22 |
# File 'lib/purl_fetcher/client/publish.rb', line 16 def initialize(cocina:, file_uploads:, version:, version_date:, must_version:) @cocina = cocina @file_uploads = file_uploads @version = version @version_date = version_date @must_version = must_version end |
Class Method Details
.publish ⇒ Object
7 8 9 |
# File 'lib/purl_fetcher/client/publish.rb', line 7 def self.publish(...) new(...).publish end |
Instance Method Details
#publish ⇒ Object
24 25 26 27 28 |
# File 'lib/purl_fetcher/client/publish.rb', line 24 def publish logger.debug("Starting a publish request for: #{druid}") client.put(path:, body:) logger.debug("Publish request complete") end |