Class: Dor::Services::Client::Workflows
- Inherits:
-
VersionedService
- Object
- VersionedService
- Dor::Services::Client::Workflows
- Defined in:
- lib/dor/services/client/workflows.rb
Overview
API calls that are about workflows
Instance Method Summary collapse
-
#initial(name:) ⇒ String
Get the initial XML for a workflow.
Methods inherited from VersionedService
Constructor Details
This class inherits a constructor from Dor::Services::Client::VersionedService
Instance Method Details
#initial(name:) ⇒ String
Get the initial XML for a workflow
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/dor/services/client/workflows.rb', line 11 def initial(name:) resp = connection.get do |req| req.url "#{api_version}/workflows/#{name}/initial" # asking the service to return XML req.headers['Accept'] = 'application/xml' end return resp.body if resp.success? raise UnexpectedResponse, "#{resp.reason_phrase}: #{resp.status} (#{resp.body})" end |