Module: Panoptes::Client::Workflows
- Included in:
- Panoptes::Client
- Defined in:
- lib/panoptes/client/workflows.rb
Instance Method Summary collapse
Instance Method Details
#create_workflow(attributes) ⇒ Object
9 10 11 12 |
# File 'lib/panoptes/client/workflows.rb', line 9 def create_workflow(attributes) response = panoptes.post("/workflows", workflows: attributes) response.fetch("workflows").first end |
#workflow(workflow_id) ⇒ Object
4 5 6 7 |
# File 'lib/panoptes/client/workflows.rb', line 4 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 |