Sha256: e4e320b1937d710d163cc9825f948f8d5b4ea42915970cc7e664207d357b4d11
Contents?: true
Size: 746 Bytes
Versions: 1
Compression:
Stored size: 746 Bytes
Contents
# frozen_string_literal: true module Dor module Services class Client # API calls that are about the DOR workspace class Workspace < VersionedService # Initializes a new workspace # @param object [String] the pid for the object # @param source [String] the path to the object # @raises [Error] if the request is unsuccessful. # @return nil def create(object:, source:) resp = connection.post do |req| req.url "#{version}/objects/#{object}/initialize_workspace" req.params['source'] = source end raise Error, "#{resp.reason_phrase}: #{resp.status} (#{resp.body})" unless resp.success? end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
dor-services-client-0.4.0 | lib/dor/services/client/workspace.rb |