Module: JPSClient::API::Tool
- Included in:
- Client
- Defined in:
- lib/jpsclient/api/tool.rb
Overview
Tool 相关 API 自动生成的模块,处理 tool 相关接口
Instance Method Summary collapse
-
#create_tool(params: {}) ⇒ Hash
Create Tool.
-
#create_tools(params: {}) ⇒ Hash
Create Tools.
-
#delete_tool(toolId:, params: {}) ⇒ Hash
Delete Tool.
-
#get_tool_detail(toolId:, params: {}) ⇒ Hash
Get Tool Detail.
-
#update_tool(toolId:, params: {}) ⇒ Hash
Update Tool.
Instance Method Details
#create_tool(params: {}) ⇒ Hash
Create Tool
66 67 68 69 70 71 72 73 |
# File 'lib/jpsclient/api/tool.rb', line 66 def create_tool(params: {}) config = @request_config && @request_config["tool_tool"] raise JPSClient::ExceptionError, "Missing config for tool_tool" unless config && config["url"] path = config["url"] return request_with_auth(:post, path, body: params) end |
#create_tools(params: {}) ⇒ Hash
Create Tools
53 54 55 56 57 58 59 60 |
# File 'lib/jpsclient/api/tool.rb', line 53 def create_tools(params: {}) config = @request_config && @request_config["tool_tools"] raise JPSClient::ExceptionError, "Missing config for tool_tools" unless config && config["url"] path = config["url"] return request_with_auth(:post, path, body: params) end |
#delete_tool(toolId:, params: {}) ⇒ Hash
Delete Tool
39 40 41 42 43 44 45 46 47 |
# File 'lib/jpsclient/api/tool.rb', line 39 def delete_tool(toolId:, params: {}) config = @request_config && @request_config["tool_tool"] raise JPSClient::ExceptionError, "Missing config for tool_tool" unless config && config["url"] path = config["url"] path = path.gsub("{toolId}", toolId.to_s) return request_with_auth(:delete, path) end |
#get_tool_detail(toolId:, params: {}) ⇒ Hash
Get Tool Detail
11 12 13 14 15 16 17 18 19 |
# File 'lib/jpsclient/api/tool.rb', line 11 def get_tool_detail(toolId:, params: {}) config = @request_config && @request_config["tool_tool_detail"] raise JPSClient::ExceptionError, "Missing config for tool_tool_detail" unless config && config["url"] path = config["url"] path = path.gsub("{toolId}", toolId.to_s) return request_with_auth(:get, path, params: params) end |
#update_tool(toolId:, params: {}) ⇒ Hash
Update Tool
25 26 27 28 29 30 31 32 33 |
# File 'lib/jpsclient/api/tool.rb', line 25 def update_tool(toolId:, params: {}) config = @request_config && @request_config["tool_tool"] raise JPSClient::ExceptionError, "Missing config for tool_tool" unless config && config["url"] path = config["url"] path = path.gsub("{toolId}", toolId.to_s) return request_with_auth(:put, path, body: params) end |