Class: Dor::Services::Client::Workspace
- Inherits:
-
VersionedService
- Object
- VersionedService
- Dor::Services::Client::Workspace
- Defined in:
- lib/dor/services/client/workspace.rb
Overview
API calls that are about the DOR workspace
Instance Method Summary collapse
-
#create(object:, source:) ⇒ Object
Initializes a new workspace.
Methods inherited from VersionedService
Constructor Details
This class inherits a constructor from Dor::Services::Client::VersionedService
Instance Method Details
#create(object:, source:) ⇒ Object
Initializes a new workspace
13 14 15 16 17 18 19 |
# File 'lib/dor/services/client/workspace.rb', line 13 def create(object:, source:) resp = connection.post do |req| req.url "#{api_version}/objects/#{object}/initialize_workspace" req.params['source'] = source end raise UnexpectedResponse, "#{resp.reason_phrase}: #{resp.status} (#{resp.body})" unless resp.success? end |