Sha256: 578c994167831d264b4d828ebb4af349bc9e550a6892cdf179813060847b0f98

Contents?: true

Size: 421 Bytes

Versions: 10

Compression:

Stored size: 421 Bytes

Contents

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

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

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
panoptes-client-0.3.3 lib/panoptes/client/workflows.rb
panoptes-client-0.3.2 lib/panoptes/client/workflows.rb
panoptes-client-0.3.1 lib/panoptes/client/workflows.rb
panoptes-client-0.3.0 lib/panoptes/client/workflows.rb
panoptes-client-0.2.13 lib/panoptes/client/workflows.rb
panoptes-client-0.2.12 lib/panoptes/client/workflows.rb
panoptes-client-0.2.11 lib/panoptes/client/workflows.rb
panoptes-client-0.2.10 lib/panoptes/client/workflows.rb
panoptes-client-0.2.9 lib/panoptes/client/workflows.rb
panoptes-client-0.2.8 lib/panoptes/client/workflows.rb