lib/sdr_client/deposit.rb in sdr-client-0.1.0 vs lib/sdr_client/deposit.rb in sdr-client-0.2.0

- old
+ new

@@ -1,13 +1,25 @@ # frozen_string_literal: true module SdrClient # The namespace for the "deposit" command module Deposit - def self.run(label:, + def self.run(label: nil, type: 'http://cocina.sul.stanford.edu/models/book.jsonld', + apo:, + collection:, + catkey: nil, + source_id:, url:, files: []) - Process.new(label: label, type: type, url: url, files: files).run + token = Credentials.read + + metadata = Request.new(label: label, + type: type, + apo: apo, + collection: collection, + source_id: source_id, + catkey: catkey) + Process.new(metadata: metadata, url: url, token: token, files: files).run end end end require 'json' require 'sdr_client/deposit/files/direct_upload_request'