Module: JPSClient::API::Survey
- Included in:
- Client
- Defined in:
- lib/jpsclient/api/survey.rb
Overview
Survey 相关 API 自动生成的模块,处理 survey 相关接口
Instance Method Summary collapse
-
#create_create(params: {}) ⇒ Hash
Create Create.
-
#delete_survey(surveyId:, params: {}) ⇒ Hash
Delete Survey.
-
#get_list(params: {}) ⇒ Hash
Get List.
-
#get_types(params: {}) ⇒ Hash
Get Types.
-
#update_survey(surveyId:, params: {}) ⇒ Hash
Update Survey.
Instance Method Details
#create_create(params: {}) ⇒ Hash
Create Create
66 67 68 69 70 71 72 73 |
# File 'lib/jpsclient/api/survey.rb', line 66 def create_create(params: {}) config = @request_config && @request_config["survey_create"] raise JPSClient::ExceptionError, "Missing config for survey_create" unless config && config["url"] path = config["url"] return request_with_auth(:post, path, body: params) end |
#delete_survey(surveyId:, params: {}) ⇒ Hash
Delete Survey
25 26 27 28 29 30 31 32 33 |
# File 'lib/jpsclient/api/survey.rb', line 25 def delete_survey(surveyId:, params: {}) config = @request_config && @request_config["survey_survey"] raise JPSClient::ExceptionError, "Missing config for survey_survey" unless config && config["url"] path = config["url"] path = path.gsub("{surveyId}", surveyId.to_s) return request_with_auth(:delete, path) end |
#get_list(params: {}) ⇒ Hash
Get List
53 54 55 56 57 58 59 60 |
# File 'lib/jpsclient/api/survey.rb', line 53 def get_list(params: {}) config = @request_config && @request_config["survey_list"] raise JPSClient::ExceptionError, "Missing config for survey_list" unless config && config["url"] path = config["url"] return request_with_auth(:post, path, body: params) end |
#get_types(params: {}) ⇒ Hash
Get Types
79 80 81 82 83 84 85 86 |
# File 'lib/jpsclient/api/survey.rb', line 79 def get_types(params: {}) config = @request_config && @request_config["survey_types"] raise JPSClient::ExceptionError, "Missing config for survey_types" unless config && config["url"] path = config["url"] return request_with_auth(:get, path, params: params) end |
#update_survey(surveyId:, params: {}) ⇒ Hash
Update Survey
11 12 13 14 15 16 17 18 19 |
# File 'lib/jpsclient/api/survey.rb', line 11 def update_survey(surveyId:, params: {}) config = @request_config && @request_config["survey_survey"] raise JPSClient::ExceptionError, "Missing config for survey_survey" unless config && config["url"] path = config["url"] path = path.gsub("{surveyId}", surveyId.to_s) return request_with_auth(:put, path, body: params) end |