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