Sha256: 951fcec776e391f1ce49c76f9e5805166833e4f28cc0600369fdc603b15087f9

Contents?: true

Size: 403 Bytes

Versions: 2

Compression:

Stored size: 403 Bytes

Contents

module Panoptes
  class Client
    module Workflows
      def workflow(workflow_id)
        response = get("/workflows/#{workflow_id}")
        response.fetch("workflows").find {|i| i.fetch("id").to_s == workflow_id.to_s }
      end

      def create_workflow(attributes)
        response = post("/workflows", workflows: attributes)
        response.fetch("workflows").first
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
panoptes-client-0.2.7 lib/panoptes/client/workflows.rb
panoptes-client-0.2.6 lib/panoptes/client/workflows.rb