module Monkeylearn::Workflows
Public Class Methods
build_endpoint(*args)
click to toggle source
# File lib/monkeylearn/workflows.rb, line 27 def build_endpoint(*args) File.join('workflows', *args) + '/' end
create(name, options = {})
click to toggle source
# File lib/monkeylearn/workflows.rb, line 31 def create(name, options = {}) if options[:db_name] warn 'Note: db_name parameter is ignored by the API and will be removed soon' end data = { name: name, description: options[:description], webhook_url: options[:webhook_url], steps: options[:steps], custom_fields: options[:custom_fields], sources: options[:sources], actions: options[:actions], }.delete_if { |k,v| v.nil? } request(:post, build_endpoint, data) end
custom_fields()
click to toggle source
# File lib/monkeylearn/workflows.rb, line 23 def custom_fields return WorkflowCustomFields end
data()
click to toggle source
# File lib/monkeylearn/workflows.rb, line 19 def data return WorkflowData end
delete(module_id)
click to toggle source
# File lib/monkeylearn/workflows.rb, line 52 def delete(module_id) request(:delete, build_endpoint(module_id)) end
detail(module_id)
click to toggle source
# File lib/monkeylearn/workflows.rb, line 48 def detail(module_id) request(:get, build_endpoint(module_id)) end
steps()
click to toggle source
# File lib/monkeylearn/workflows.rb, line 15 def steps return WorkflowSteps end