Sha256: 5d91c9ed5819d05790759d9c2a59e17b532f07a59e0367899fd258b964bfdcb4

Contents?: true

Size: 605 Bytes

Versions: 3

Compression:

Stored size: 605 Bytes

Contents

#! /usr/bin/env ruby

require 'stash/sword'

include Stash::Sword

password = ARGV[0]
username = 'ucop_dash_submitter'
collection = 'dash_cdl'
collection_uri = "http://uc3-mrtsword-dev.cdlib.org:39001/mrtsword/collection/#{collection}"
zipfile = File.expand_path('../uploads/example.zip', __FILE__)

doi = "doi:10.5072/FK#{Time.now.to_i}"

client = Client.new(
  username: username,
  password: password,
  collection_uri: URI(collection_uri)
)

receipt = client.create(doi: doi, zipfile: zipfile)
em_iri = receipt.em_iri
edit_iri = receipt.edit_iri

puts "em_iri: #{em_iri}"
puts "edit_iri: #{edit_iri}"

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
stash-sword-0.1.3 examples/create.rb
stash-sword-0.1.2 examples/create.rb
stash-sword-0.1.1 examples/create.rb