Sha256: c44669bdad5494b77b1cafe4841a4e93f760e8aa7a1cdbcb4fc25e7b1daba730

Contents?: true

Size: 719 Bytes

Versions: 13

Compression:

Stored size: 719 Bytes

Contents

# frozen_string_literal: true

module Dor
  module Services
    class Client
      # API calls that are about workflows
      class Workflows < VersionedService
        # Get the initial XML for a workflow
        # @param name [String] the name of the xml
        # @return [String] the response
        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
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
dor-services-client-1.11.0 lib/dor/services/client/workflows.rb
dor-services-client-1.10.0 lib/dor/services/client/workflows.rb
dor-services-client-1.9.2 lib/dor/services/client/workflows.rb
dor-services-client-1.9.1 lib/dor/services/client/workflows.rb
dor-services-client-1.9.0 lib/dor/services/client/workflows.rb
dor-services-client-1.8.0 lib/dor/services/client/workflows.rb
dor-services-client-1.7.0 lib/dor/services/client/workflows.rb
dor-services-client-1.6.0 lib/dor/services/client/workflows.rb
dor-services-client-1.5.1 lib/dor/services/client/workflows.rb
dor-services-client-1.5.0 lib/dor/services/client/workflows.rb
dor-services-client-1.4.0 lib/dor/services/client/workflows.rb
dor-services-client-1.3.0 lib/dor/services/client/workflows.rb
dor-services-client-1.2.0 lib/dor/services/client/workflows.rb