class Wrike3::Workflow

Public Class Methods

new(wrike) click to toggle source
# File lib/wrike3/workflow.rb, line 5
def initialize(wrike)
  @wrike = wrike
end

Public Instance Methods

add(account_id, params = {}) click to toggle source

Add a new task

# File lib/wrike3/workflow.rb, line 20
def add(account_id, params = {})
  wrike.execute(:post, api_url("accounts/#{account_id}/workflows"), params)
end
details(account_id, id, params = {}) click to toggle source
# File lib/wrike3/workflow.rb, line 14
def details(account_id, id, params = {})
  matters = wrike.execute(:get, api_url("accounts/#{account_id}/workflows"), params)
  matters['data'].find { |m| m['id'] == id }
end
list(account_id, params = {}) click to toggle source

Get task list

# File lib/wrike3/workflow.rb, line 10
def list(account_id, params = {})
  wrike.execute(:get, api_url("accounts/#{account_id}/workflows"), params)
end
update(id, params = {}) click to toggle source

Update a task

# File lib/wrike3/workflow.rb, line 25
def update(id, params = {})
  wrike.execute(:put, api_url("workflows/#{id}"), params)
end