module Monkeylearn::WorkflowSteps
Public Class Methods
build_endpoint(module_id, *args)
click to toggle source
# File lib/monkeylearn/workflows.rb, line 62 def build_endpoint(module_id, *args) File.join('workflows', module_id, 'steps', *args.collect { |x| x.to_s }) + '/' end
create(module_id, options = {})
click to toggle source
# File lib/monkeylearn/workflows.rb, line 66 def create(module_id, options = {}) data = { name: options[:name], model_id: options[:step_model_id], input_step: options[:input_step], conditions: options[:conditions], }.delete_if { |k,v| v.nil? } request(:post, build_endpoint(module_id), data) end