Sha256: a32998af10dc49ef4dc69e7826b59d99c823ef81153b8d2ad237230f7acc0f3d
Contents?: true
Size: 620 Bytes
Versions: 1
Compression:
Stored size: 620 Bytes
Contents
#! /usr/bin/env ruby require 'stash/sword' include Stash::Sword username, password, collection = ARGV client = Client.new( username: username, password: password, collection_uri: URI("http://uc3-mrtsword-dev.cdlib.org:39001/mrtsword/collection/#{collection}") ) doi = "doi:10.5072/FK#{Time.now.to_i}" zipfile = File.expand_path('../uploads/example.zip', __FILE__) receipt = client.create(doi: doi, zipfile: zipfile) em_iri = receipt.em_iri se_iri = receipt.se_iri puts "em_iri: #{em_iri}" puts "se_iri: #{se_iri}" code = client.update(se_iri: se_iri, zipfile: zipfile) puts "update response code: #{code}"
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
stash-sword-0.1.0 | examples/example.rb |