Module: JPSClient::API::Workflow

Included in:
Client
Defined in:
lib/jpsclient/api/workflow.rb

Overview

Workflow 相关 API 自动生成的模块,处理 workflow 相关接口

Instance Method Summary collapse

Instance Method Details

#create_create(params: {}) ⇒ Hash

Create Create

Parameters:

  • params (Hash) (defaults to: {})

    请求参数

Returns:

  • (Hash)

    API响应

Raises:



50
51
52
53
54
55
56
57
# File 'lib/jpsclient/api/workflow.rb', line 50

def create_create(params: {})
  config = @request_config && @request_config["workflow_create"]
  raise JPSClient::ExceptionError, "Missing config for workflow_create" unless config && config["url"]

  path = config["url"]

  return request_with_auth(:post, path, body: params)
end

#create_delete(params: {}) ⇒ Hash

Create Delete

Parameters:

  • params (Hash) (defaults to: {})

    请求参数

Returns:

  • (Hash)

    API响应

Raises:



37
38
39
40
41
42
43
44
# File 'lib/jpsclient/api/workflow.rb', line 37

def create_delete(params: {})
  config = @request_config && @request_config["workflow_delete"]
  raise JPSClient::ExceptionError, "Missing config for workflow_delete" unless config && config["url"]

  path = config["url"]

  return request_with_auth(:post, path, body: params)
end

#create_sort(params: {}) ⇒ Hash

Create Sort

Parameters:

  • params (Hash) (defaults to: {})

    请求参数

Returns:

  • (Hash)

    API响应

Raises:



24
25
26
27
28
29
30
31
# File 'lib/jpsclient/api/workflow.rb', line 24

def create_sort(params: {})
  config = @request_config && @request_config["workflow_sort"]
  raise JPSClient::ExceptionError, "Missing config for workflow_sort" unless config && config["url"]

  path = config["url"]

  return request_with_auth(:post, path, body: params)
end

#create_update(params: {}) ⇒ Hash

Create Update

Parameters:

  • params (Hash) (defaults to: {})

    请求参数

Returns:

  • (Hash)

    API响应

Raises:



11
12
13
14
15
16
17
18
# File 'lib/jpsclient/api/workflow.rb', line 11

def create_update(params: {})
  config = @request_config && @request_config["workflow_update"]
  raise JPSClient::ExceptionError, "Missing config for workflow_update" unless config && config["url"]

  path = config["url"]

  return request_with_auth(:post, path, body: params)
end

#get_list(params: {}) ⇒ Hash

Get List

Parameters:

  • params (Hash) (defaults to: {})

    请求参数

Returns:

  • (Hash)

    API响应

Raises:



63
64
65
66
67
68
69
70
# File 'lib/jpsclient/api/workflow.rb', line 63

def get_list(params: {})
  config = @request_config && @request_config["workflow_list"]
  raise JPSClient::ExceptionError, "Missing config for workflow_list" unless config && config["url"]

  path = config["url"]

  return request_with_auth(:get, path, params: params)
end

#get_project_workflows(project_id:) ⇒ Hash

获取指定项目的工作流列表

Parameters:

  • project_id (String)

    项目ID

Returns:

  • (Hash)

    API响应,包含工作流列表



76
77
78
79
# File 'lib/jpsclient/api/workflow.rb', line 76

def get_project_workflows(project_id:)
  params = { projectId: project_id }
  get_list(params: params)
end