indexea_client 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/README.md +3413 -0
- data/Rakefile +8 -0
- data/docs/AccountApi.md +685 -0
- data/docs/AccountBean.md +27 -0
- data/docs/AccountPasswdBody.md +8 -0
- data/docs/AccountPortraitBody.md +7 -0
- data/docs/AccountProfileBody.md +8 -0
- data/docs/AccountResetpwdBody.md +9 -0
- data/docs/AccountSigninBody.md +9 -0
- data/docs/AccountSignupBody.md +10 -0
- data/docs/AccountsFeedbackBody.md +8 -0
- data/docs/AccountsMessageBody.md +8 -0
- data/docs/AnalyzeObject.md +8 -0
- data/docs/AnalyzeToken.md +11 -0
- data/docs/AppBean.md +23 -0
- data/docs/AppCompanyBody.md +22 -0
- data/docs/AppIndexBody.md +7 -0
- data/docs/AppLogAccount.md +9 -0
- data/docs/AppLogBean.md +19 -0
- data/docs/AppLogsBean.md +9 -0
- data/docs/AppMentorBean.md +14 -0
- data/docs/AppOauthBody.md +7 -0
- data/docs/AppOauthBody1.md +7 -0
- data/docs/AppOauthresetsecretBody.md +7 -0
- data/docs/AppTokensBody.md +7 -0
- data/docs/AppTokensBody1.md +7 -0
- data/docs/AppWidgetBody.md +7 -0
- data/docs/AppsApi.md +1843 -0
- data/docs/AppsAppBody.md +8 -0
- data/docs/AppsBody.md +8 -0
- data/docs/AutoCompleteItem.md +9 -0
- data/docs/BlacklistBean.md +12 -0
- data/docs/Bulletin.md +15 -0
- data/docs/CompanyBean.md +24 -0
- data/docs/ContactForm.md +11 -0
- data/docs/CrawlerLog.md +14 -0
- data/docs/CrawlerLogs.md +8 -0
- data/docs/CrawlerTask.md +16 -0
- data/docs/FieldsApi.md +215 -0
- data/docs/GlobalApi.md +258 -0
- data/docs/GlobalOptionForm.md +8 -0
- data/docs/IndexBean.md +26 -0
- data/docs/IndexFieldBean.md +8 -0
- data/docs/IndexForm.md +15 -0
- data/docs/IndexRebuildForm.md +12 -0
- data/docs/IndexSettings.md +10 -0
- data/docs/IndexSettingsBody.md +7 -0
- data/docs/IndexStatBean.md +14 -0
- data/docs/IndexSynonymsflushBody.md +7 -0
- data/docs/IndexTask.md +13 -0
- data/docs/IndexTemplate.md +17 -0
- data/docs/IndexTemplates.md +8 -0
- data/docs/IndexUploadBody.md +7 -0
- data/docs/IndicesApi.md +1620 -0
- data/docs/IntelligentMapping.md +8 -0
- data/docs/KeywordBindingBean.md +14 -0
- data/docs/MentorForm.md +8 -0
- data/docs/Message.md +18 -0
- data/docs/MessageApi.md +262 -0
- data/docs/Messages.md +8 -0
- data/docs/OauthAppBean.md +20 -0
- data/docs/OpenidBean.md +10 -0
- data/docs/OptionForm.md +10 -0
- data/docs/OrdersIdentBody.md +7 -0
- data/docs/PayResult.md +9 -0
- data/docs/PaymentApi.md +788 -0
- data/docs/PaymentInvoice.md +15 -0
- data/docs/PaymentOrder.md +25 -0
- data/docs/PaymentRecord.md +13 -0
- data/docs/PaymentService.md +12 -0
- data/docs/QueriesApi.md +1821 -0
- data/docs/QueryActionBean.md +27 -0
- data/docs/QueryBean.md +22 -0
- data/docs/QueryForm.md +15 -0
- data/docs/QueryNode.md +10 -0
- data/docs/QuerySortField.md +9 -0
- data/docs/QueryVariableBean.md +17 -0
- data/docs/RecommendApi.md +365 -0
- data/docs/RecommendBean.md +18 -0
- data/docs/RecordFilter.md +10 -0
- data/docs/RecordsApi.md +286 -0
- data/docs/SearchApi.md +646 -0
- data/docs/SearchEstimateResult.md +11 -0
- data/docs/SearchWord.md +8 -0
- data/docs/StatIndexBean.md +14 -0
- data/docs/StatsApi.md +245 -0
- data/docs/SynonymsBean.md +14 -0
- data/docs/TokenBean.md +12 -0
- data/docs/TriggerBean.md +13 -0
- data/docs/TriggerLogBean.md +15 -0
- data/docs/ValueOfField.md +8 -0
- data/docs/WidgetBean.md +21 -0
- data/docs/WidgetForm.md +13 -0
- data/docs/WidgetLogo.md +7 -0
- data/docs/WidgetLogoBody.md +7 -0
- data/docs/WidgetStatusForm.md +8 -0
- data/docs/WidgetsApi.md +573 -0
- data/git_push.sh +55 -0
- data/indexea_client.gemspec +38 -0
- data/lib/indexea_client/api/account_api.rb +846 -0
- data/lib/indexea_client/api/apps_api.rb +2271 -0
- data/lib/indexea_client/api/fields_api.rb +289 -0
- data/lib/indexea_client/api/global_api.rb +326 -0
- data/lib/indexea_client/api/indices_api.rb +2076 -0
- data/lib/indexea_client/api/message_api.rb +337 -0
- data/lib/indexea_client/api/payment_api.rb +975 -0
- data/lib/indexea_client/api/queries_api.rb +2320 -0
- data/lib/indexea_client/api/recommend_api.rb +461 -0
- data/lib/indexea_client/api/records_api.rb +375 -0
- data/lib/indexea_client/api/search_api.rb +892 -0
- data/lib/indexea_client/api/stats_api.rb +312 -0
- data/lib/indexea_client/api/widgets_api.rb +741 -0
- data/lib/indexea_client/api_client.rb +391 -0
- data/lib/indexea_client/api_error.rb +57 -0
- data/lib/indexea_client/configuration.rb +205 -0
- data/lib/indexea_client/models/account_bean.rb +396 -0
- data/lib/indexea_client/models/account_passwd_body.rb +227 -0
- data/lib/indexea_client/models/account_portrait_body.rb +206 -0
- data/lib/indexea_client/models/account_profile_body.rb +228 -0
- data/lib/indexea_client/models/account_resetpwd_body.rb +240 -0
- data/lib/indexea_client/models/account_signin_body.rb +237 -0
- data/lib/indexea_client/models/account_signup_body.rb +254 -0
- data/lib/indexea_client/models/accounts_feedback_body.rb +262 -0
- data/lib/indexea_client/models/accounts_message_body.rb +226 -0
- data/lib/indexea_client/models/analyze_object.rb +216 -0
- data/lib/indexea_client/models/analyze_token.rb +243 -0
- data/lib/indexea_client/models/app_bean.rb +360 -0
- data/lib/indexea_client/models/app_company_body.rb +357 -0
- data/lib/indexea_client/models/app_index_body.rb +212 -0
- data/lib/indexea_client/models/app_log_account.rb +224 -0
- data/lib/indexea_client/models/app_log_bean.rb +318 -0
- data/lib/indexea_client/models/app_logs_bean.rb +229 -0
- data/lib/indexea_client/models/app_mentor_bean.rb +277 -0
- data/lib/indexea_client/models/app_oauth_body.rb +206 -0
- data/lib/indexea_client/models/app_oauth_body_1.rb +212 -0
- data/lib/indexea_client/models/app_oauthresetsecret_body.rb +212 -0
- data/lib/indexea_client/models/app_tokens_body.rb +212 -0
- data/lib/indexea_client/models/app_tokens_body_1.rb +212 -0
- data/lib/indexea_client/models/app_widget_body.rb +212 -0
- data/lib/indexea_client/models/apps_app_body.rb +216 -0
- data/lib/indexea_client/models/apps_body.rb +221 -0
- data/lib/indexea_client/models/auto_complete_item.rb +224 -0
- data/lib/indexea_client/models/blacklist_bean.rb +258 -0
- data/lib/indexea_client/models/bulletin.rb +312 -0
- data/lib/indexea_client/models/company_bean.rb +378 -0
- data/lib/indexea_client/models/contact_form.rb +258 -0
- data/lib/indexea_client/models/crawler_log.rb +270 -0
- data/lib/indexea_client/models/crawler_logs.rb +217 -0
- data/lib/indexea_client/models/crawler_task.rb +288 -0
- data/lib/indexea_client/models/global_option_form.rb +218 -0
- data/lib/indexea_client/models/index_bean.rb +390 -0
- data/lib/indexea_client/models/index_field_bean.rb +217 -0
- data/lib/indexea_client/models/index_form.rb +283 -0
- data/lib/indexea_client/models/index_rebuild_form.rb +254 -0
- data/lib/indexea_client/models/index_settings.rb +234 -0
- data/lib/indexea_client/models/index_settings_body.rb +212 -0
- data/lib/indexea_client/models/index_stat_bean.rb +270 -0
- data/lib/indexea_client/models/index_synonymsflush_body.rb +212 -0
- data/lib/indexea_client/models/index_task.rb +261 -0
- data/lib/indexea_client/models/index_template.rb +299 -0
- data/lib/indexea_client/models/index_templates.rb +219 -0
- data/lib/indexea_client/models/index_upload_body.rb +208 -0
- data/lib/indexea_client/models/intelligent_mapping.rb +217 -0
- data/lib/indexea_client/models/keyword_binding_bean.rb +274 -0
- data/lib/indexea_client/models/mentor_form.rb +220 -0
- data/lib/indexea_client/models/message.rb +306 -0
- data/lib/indexea_client/models/messages.rb +217 -0
- data/lib/indexea_client/models/oauth_app_bean.rb +329 -0
- data/lib/indexea_client/models/openid_bean.rb +238 -0
- data/lib/indexea_client/models/option_form.rb +287 -0
- data/lib/indexea_client/models/orders_ident_body.rb +206 -0
- data/lib/indexea_client/models/pay_result.rb +258 -0
- data/lib/indexea_client/models/payment_invoice.rb +283 -0
- data/lib/indexea_client/models/payment_order.rb +412 -0
- data/lib/indexea_client/models/payment_record.rb +261 -0
- data/lib/indexea_client/models/payment_service.rb +258 -0
- data/lib/indexea_client/models/query_action_bean.rb +391 -0
- data/lib/indexea_client/models/query_bean.rb +348 -0
- data/lib/indexea_client/models/query_form.rb +285 -0
- data/lib/indexea_client/models/query_node.rb +234 -0
- data/lib/indexea_client/models/query_sort_field.rb +264 -0
- data/lib/indexea_client/models/query_variable_bean.rb +335 -0
- data/lib/indexea_client/models/recommend_bean.rb +318 -0
- data/lib/indexea_client/models/record_filter.rb +242 -0
- data/lib/indexea_client/models/search_estimate_result.rb +242 -0
- data/lib/indexea_client/models/search_word.rb +218 -0
- data/lib/indexea_client/models/stat_index_bean.rb +270 -0
- data/lib/indexea_client/models/synonyms_bean.rb +274 -0
- data/lib/indexea_client/models/token_bean.rb +252 -0
- data/lib/indexea_client/models/trigger_bean.rb +263 -0
- data/lib/indexea_client/models/trigger_log_bean.rb +279 -0
- data/lib/indexea_client/models/value_of_field.rb +217 -0
- data/lib/indexea_client/models/widget_bean.rb +387 -0
- data/lib/indexea_client/models/widget_form.rb +328 -0
- data/lib/indexea_client/models/widget_logo.rb +206 -0
- data/lib/indexea_client/models/widget_logo_body.rb +206 -0
- data/lib/indexea_client/models/widget_status_form.rb +223 -0
- data/lib/indexea_client/version.rb +14 -0
- data/lib/indexea_client.rb +133 -0
- data/spec/api/account_api_spec.rb +200 -0
- data/spec/api/apps_api_spec.rb +492 -0
- data/spec/api/fields_api_spec.rb +86 -0
- data/spec/api/global_api_spec.rb +98 -0
- data/spec/api/indices_api_spec.rb +434 -0
- data/spec/api/message_api_spec.rb +96 -0
- data/spec/api/payment_api_spec.rb +227 -0
- data/spec/api/queries_api_spec.rb +482 -0
- data/spec/api/recommend_api_spec.rb +125 -0
- data/spec/api/records_api_spec.rb +107 -0
- data/spec/api/search_api_spec.rb +220 -0
- data/spec/api/stats_api_spec.rb +99 -0
- data/spec/api/widgets_api_spec.rb +174 -0
- data/spec/api_client_spec.rb +225 -0
- data/spec/base_object_spec.rb +109 -0
- data/spec/configuration_spec.rb +41 -0
- data/spec/models/account_bean_spec.rb +160 -0
- data/spec/models/account_passwd_body_spec.rb +46 -0
- data/spec/models/account_portrait_body_spec.rb +40 -0
- data/spec/models/account_profile_body_spec.rb +46 -0
- data/spec/models/account_resetpwd_body_spec.rb +52 -0
- data/spec/models/account_signin_body_spec.rb +52 -0
- data/spec/models/account_signup_body_spec.rb +58 -0
- data/spec/models/accounts_feedback_body_spec.rb +50 -0
- data/spec/models/accounts_message_body_spec.rb +46 -0
- data/spec/models/analyze_object_spec.rb +46 -0
- data/spec/models/analyze_token_spec.rb +64 -0
- data/spec/models/app_bean_spec.rb +136 -0
- data/spec/models/app_company_body_spec.rb +130 -0
- data/spec/models/app_index_body_spec.rb +40 -0
- data/spec/models/app_log_account_spec.rb +52 -0
- data/spec/models/app_log_bean_spec.rb +112 -0
- data/spec/models/app_logs_bean_spec.rb +52 -0
- data/spec/models/app_mentor_bean_spec.rb +82 -0
- data/spec/models/app_oauth_body_1_spec.rb +40 -0
- data/spec/models/app_oauth_body_spec.rb +40 -0
- data/spec/models/app_oauthresetsecret_body_spec.rb +40 -0
- data/spec/models/app_tokens_body_1_spec.rb +40 -0
- data/spec/models/app_tokens_body_spec.rb +40 -0
- data/spec/models/app_widget_body_spec.rb +40 -0
- data/spec/models/apps_app_body_spec.rb +46 -0
- data/spec/models/apps_body_spec.rb +46 -0
- data/spec/models/auto_complete_item_spec.rb +52 -0
- data/spec/models/blacklist_bean_spec.rb +70 -0
- data/spec/models/bulletin_spec.rb +92 -0
- data/spec/models/company_bean_spec.rb +142 -0
- data/spec/models/contact_form_spec.rb +64 -0
- data/spec/models/crawler_log_spec.rb +82 -0
- data/spec/models/crawler_logs_spec.rb +46 -0
- data/spec/models/crawler_task_spec.rb +94 -0
- data/spec/models/global_option_form_spec.rb +46 -0
- data/spec/models/index_bean_spec.rb +154 -0
- data/spec/models/index_field_bean_spec.rb +46 -0
- data/spec/models/index_form_spec.rb +88 -0
- data/spec/models/index_rebuild_form_spec.rb +70 -0
- data/spec/models/index_settings_body_spec.rb +40 -0
- data/spec/models/index_settings_spec.rb +58 -0
- data/spec/models/index_stat_bean_spec.rb +82 -0
- data/spec/models/index_synonymsflush_body_spec.rb +40 -0
- data/spec/models/index_task_spec.rb +76 -0
- data/spec/models/index_template_spec.rb +100 -0
- data/spec/models/index_templates_spec.rb +46 -0
- data/spec/models/index_upload_body_spec.rb +40 -0
- data/spec/models/intelligent_mapping_spec.rb +46 -0
- data/spec/models/keyword_binding_bean_spec.rb +82 -0
- data/spec/models/mentor_form_spec.rb +46 -0
- data/spec/models/message_spec.rb +106 -0
- data/spec/models/messages_spec.rb +46 -0
- data/spec/models/oauth_app_bean_spec.rb +118 -0
- data/spec/models/openid_bean_spec.rb +58 -0
- data/spec/models/option_form_spec.rb +62 -0
- data/spec/models/orders_ident_body_spec.rb +40 -0
- data/spec/models/pay_result_spec.rb +56 -0
- data/spec/models/payment_invoice_spec.rb +88 -0
- data/spec/models/payment_order_spec.rb +152 -0
- data/spec/models/payment_record_spec.rb +76 -0
- data/spec/models/payment_service_spec.rb +70 -0
- data/spec/models/query_action_bean_spec.rb +160 -0
- data/spec/models/query_bean_spec.rb +130 -0
- data/spec/models/query_form_spec.rb +88 -0
- data/spec/models/query_node_spec.rb +58 -0
- data/spec/models/query_sort_field_spec.rb +56 -0
- data/spec/models/query_variable_bean_spec.rb +104 -0
- data/spec/models/recommend_bean_spec.rb +106 -0
- data/spec/models/record_filter_spec.rb +58 -0
- data/spec/models/search_estimate_result_spec.rb +64 -0
- data/spec/models/search_word_spec.rb +46 -0
- data/spec/models/stat_index_bean_spec.rb +82 -0
- data/spec/models/synonyms_bean_spec.rb +82 -0
- data/spec/models/token_bean_spec.rb +70 -0
- data/spec/models/trigger_bean_spec.rb +76 -0
- data/spec/models/trigger_log_bean_spec.rb +88 -0
- data/spec/models/value_of_field_spec.rb +46 -0
- data/spec/models/widget_bean_spec.rb +132 -0
- data/spec/models/widget_form_spec.rb +84 -0
- data/spec/models/widget_logo_body_spec.rb +40 -0
- data/spec/models/widget_logo_spec.rb +40 -0
- data/spec/models/widget_status_form_spec.rb +46 -0
- data/spec/spec_helper.rb +110 -0
- metadata +501 -0
@@ -0,0 +1,846 @@
|
|
1
|
+
=begin
|
2
|
+
#Indexea OpenAPI
|
3
|
+
|
4
|
+
#OpenAPI of Indexea
|
5
|
+
|
6
|
+
OpenAPI spec version: 1.0.0
|
7
|
+
Contact: indexea.com@gmail.com
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 3.0.54
|
10
|
+
=end
|
11
|
+
|
12
|
+
module IndexeaClient
|
13
|
+
class AccountApi
|
14
|
+
attr_accessor :api_client
|
15
|
+
|
16
|
+
def initialize(api_client = ApiClient.default)
|
17
|
+
@api_client = api_client
|
18
|
+
end
|
19
|
+
# 获取系统公告
|
20
|
+
# 获取系统公告
|
21
|
+
# @param [Hash] opts the optional parameters
|
22
|
+
# @return [Bulletin]
|
23
|
+
def account_bulletin(opts = {})
|
24
|
+
data, _status_code, _headers = account_bulletin_with_http_info(opts)
|
25
|
+
data
|
26
|
+
end
|
27
|
+
|
28
|
+
# 获取系统公告
|
29
|
+
# 获取系统公告
|
30
|
+
# @param [Hash] opts the optional parameters
|
31
|
+
# @return [Array<(Bulletin, Integer, Hash)>] Bulletin data, response status code and response headers
|
32
|
+
def account_bulletin_with_http_info(opts = {})
|
33
|
+
if @api_client.config.debugging
|
34
|
+
@api_client.config.logger.debug 'Calling API: AccountApi.account_bulletin ...'
|
35
|
+
end
|
36
|
+
# resource path
|
37
|
+
local_var_path = '/accounts/bulletin'
|
38
|
+
|
39
|
+
# query parameters
|
40
|
+
query_params = opts[:query_params] || {}
|
41
|
+
|
42
|
+
# header parameters
|
43
|
+
header_params = opts[:header_params] || {}
|
44
|
+
# HTTP header 'Accept' (if needed)
|
45
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
46
|
+
|
47
|
+
# form parameters
|
48
|
+
form_params = opts[:form_params] || {}
|
49
|
+
|
50
|
+
# http body (model)
|
51
|
+
post_body = opts[:body]
|
52
|
+
|
53
|
+
return_type = opts[:return_type] || 'Bulletin'
|
54
|
+
|
55
|
+
auth_names = opts[:auth_names] || ['TokenAuth']
|
56
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
57
|
+
:header_params => header_params,
|
58
|
+
:query_params => query_params,
|
59
|
+
:form_params => form_params,
|
60
|
+
:body => post_body,
|
61
|
+
:auth_names => auth_names,
|
62
|
+
:return_type => return_type)
|
63
|
+
|
64
|
+
if @api_client.config.debugging
|
65
|
+
@api_client.config.logger.debug "API called: AccountApi#account_bulletin\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
66
|
+
end
|
67
|
+
return data, status_code, headers
|
68
|
+
end
|
69
|
+
# 注销账号
|
70
|
+
# @param [Hash] opts the optional parameters
|
71
|
+
# @option opts [String] :pwd
|
72
|
+
# @option opts [String] :vcode
|
73
|
+
# @return [BOOLEAN]
|
74
|
+
def account_delete(opts = {})
|
75
|
+
data, _status_code, _headers = account_delete_with_http_info(opts)
|
76
|
+
data
|
77
|
+
end
|
78
|
+
|
79
|
+
# 注销账号
|
80
|
+
# @param [Hash] opts the optional parameters
|
81
|
+
# @option opts [String] :pwd
|
82
|
+
# @option opts [String] :vcode
|
83
|
+
# @return [Array<(BOOLEAN, Integer, Hash)>] BOOLEAN data, response status code and response headers
|
84
|
+
def account_delete_with_http_info(opts = {})
|
85
|
+
if @api_client.config.debugging
|
86
|
+
@api_client.config.logger.debug 'Calling API: AccountApi.account_delete ...'
|
87
|
+
end
|
88
|
+
# resource path
|
89
|
+
local_var_path = '/account/profile'
|
90
|
+
|
91
|
+
# query parameters
|
92
|
+
query_params = opts[:query_params] || {}
|
93
|
+
|
94
|
+
# header parameters
|
95
|
+
header_params = opts[:header_params] || {}
|
96
|
+
# HTTP header 'Accept' (if needed)
|
97
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
98
|
+
# HTTP header 'Content-Type'
|
99
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
|
100
|
+
|
101
|
+
# form parameters
|
102
|
+
form_params = opts[:form_params] || {}
|
103
|
+
form_params['pwd'] = opts[:'pwd'] if !opts[:'pwd'].nil?
|
104
|
+
form_params['vcode'] = opts[:'vcode'] if !opts[:'vcode'].nil?
|
105
|
+
|
106
|
+
# http body (model)
|
107
|
+
post_body = opts[:body]
|
108
|
+
|
109
|
+
return_type = opts[:return_type] || 'BOOLEAN'
|
110
|
+
|
111
|
+
auth_names = opts[:auth_names] || ['TokenAuth']
|
112
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
113
|
+
:header_params => header_params,
|
114
|
+
:query_params => query_params,
|
115
|
+
:form_params => form_params,
|
116
|
+
:body => post_body,
|
117
|
+
:auth_names => auth_names,
|
118
|
+
:return_type => return_type)
|
119
|
+
|
120
|
+
if @api_client.config.debugging
|
121
|
+
@api_client.config.logger.debug "API called: AccountApi#account_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
122
|
+
end
|
123
|
+
return data, status_code, headers
|
124
|
+
end
|
125
|
+
# 解绑三方账号
|
126
|
+
# @param type 三方账号类型
|
127
|
+
# @param openid 三方账号唯一标识
|
128
|
+
# @param [Hash] opts the optional parameters
|
129
|
+
# @return [BOOLEAN]
|
130
|
+
def account_delete_openid(type, openid, opts = {})
|
131
|
+
data, _status_code, _headers = account_delete_openid_with_http_info(type, openid, opts)
|
132
|
+
data
|
133
|
+
end
|
134
|
+
|
135
|
+
# 解绑三方账号
|
136
|
+
# @param type 三方账号类型
|
137
|
+
# @param openid 三方账号唯一标识
|
138
|
+
# @param [Hash] opts the optional parameters
|
139
|
+
# @return [Array<(BOOLEAN, Integer, Hash)>] BOOLEAN data, response status code and response headers
|
140
|
+
def account_delete_openid_with_http_info(type, openid, opts = {})
|
141
|
+
if @api_client.config.debugging
|
142
|
+
@api_client.config.logger.debug 'Calling API: AccountApi.account_delete_openid ...'
|
143
|
+
end
|
144
|
+
# verify the required parameter 'type' is set
|
145
|
+
if @api_client.config.client_side_validation && type.nil?
|
146
|
+
fail ArgumentError, "Missing the required parameter 'type' when calling AccountApi.account_delete_openid"
|
147
|
+
end
|
148
|
+
# verify the required parameter 'openid' is set
|
149
|
+
if @api_client.config.client_side_validation && openid.nil?
|
150
|
+
fail ArgumentError, "Missing the required parameter 'openid' when calling AccountApi.account_delete_openid"
|
151
|
+
end
|
152
|
+
# resource path
|
153
|
+
local_var_path = '/account/openid'
|
154
|
+
|
155
|
+
# query parameters
|
156
|
+
query_params = opts[:query_params] || {}
|
157
|
+
query_params[:'type'] = type
|
158
|
+
query_params[:'openid'] = openid
|
159
|
+
|
160
|
+
# header parameters
|
161
|
+
header_params = opts[:header_params] || {}
|
162
|
+
# HTTP header 'Accept' (if needed)
|
163
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
164
|
+
|
165
|
+
# form parameters
|
166
|
+
form_params = opts[:form_params] || {}
|
167
|
+
|
168
|
+
# http body (model)
|
169
|
+
post_body = opts[:body]
|
170
|
+
|
171
|
+
return_type = opts[:return_type] || 'BOOLEAN'
|
172
|
+
|
173
|
+
auth_names = opts[:auth_names] || ['TokenAuth']
|
174
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
175
|
+
:header_params => header_params,
|
176
|
+
:query_params => query_params,
|
177
|
+
:form_params => form_params,
|
178
|
+
:body => post_body,
|
179
|
+
:auth_names => auth_names,
|
180
|
+
:return_type => return_type)
|
181
|
+
|
182
|
+
if @api_client.config.debugging
|
183
|
+
@api_client.config.logger.debug "API called: AccountApi#account_delete_openid\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
184
|
+
end
|
185
|
+
return data, status_code, headers
|
186
|
+
end
|
187
|
+
# 获取绑定的所有三方账号
|
188
|
+
# @param [Hash] opts the optional parameters
|
189
|
+
# @return [Array<OpenidBean>]
|
190
|
+
def account_openid(opts = {})
|
191
|
+
data, _status_code, _headers = account_openid_with_http_info(opts)
|
192
|
+
data
|
193
|
+
end
|
194
|
+
|
195
|
+
# 获取绑定的所有三方账号
|
196
|
+
# @param [Hash] opts the optional parameters
|
197
|
+
# @return [Array<(Array<OpenidBean>, Integer, Hash)>] Array<OpenidBean> data, response status code and response headers
|
198
|
+
def account_openid_with_http_info(opts = {})
|
199
|
+
if @api_client.config.debugging
|
200
|
+
@api_client.config.logger.debug 'Calling API: AccountApi.account_openid ...'
|
201
|
+
end
|
202
|
+
# resource path
|
203
|
+
local_var_path = '/account/openid'
|
204
|
+
|
205
|
+
# query parameters
|
206
|
+
query_params = opts[:query_params] || {}
|
207
|
+
|
208
|
+
# header parameters
|
209
|
+
header_params = opts[:header_params] || {}
|
210
|
+
# HTTP header 'Accept' (if needed)
|
211
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
212
|
+
|
213
|
+
# form parameters
|
214
|
+
form_params = opts[:form_params] || {}
|
215
|
+
|
216
|
+
# http body (model)
|
217
|
+
post_body = opts[:body]
|
218
|
+
|
219
|
+
return_type = opts[:return_type] || 'Array<OpenidBean>'
|
220
|
+
|
221
|
+
auth_names = opts[:auth_names] || ['TokenAuth']
|
222
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
223
|
+
:header_params => header_params,
|
224
|
+
:query_params => query_params,
|
225
|
+
:form_params => form_params,
|
226
|
+
:body => post_body,
|
227
|
+
:auth_names => auth_names,
|
228
|
+
:return_type => return_type)
|
229
|
+
|
230
|
+
if @api_client.config.debugging
|
231
|
+
@api_client.config.logger.debug "API called: AccountApi#account_openid\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
232
|
+
end
|
233
|
+
return data, status_code, headers
|
234
|
+
end
|
235
|
+
# 修改账号密码
|
236
|
+
# @param password
|
237
|
+
# @param new_password
|
238
|
+
# @param [Hash] opts the optional parameters
|
239
|
+
# @return [BOOLEAN]
|
240
|
+
def account_passwd(password, new_password, opts = {})
|
241
|
+
data, _status_code, _headers = account_passwd_with_http_info(password, new_password, opts)
|
242
|
+
data
|
243
|
+
end
|
244
|
+
|
245
|
+
# 修改账号密码
|
246
|
+
# @param password
|
247
|
+
# @param new_password
|
248
|
+
# @param [Hash] opts the optional parameters
|
249
|
+
# @return [Array<(BOOLEAN, Integer, Hash)>] BOOLEAN data, response status code and response headers
|
250
|
+
def account_passwd_with_http_info(password, new_password, opts = {})
|
251
|
+
if @api_client.config.debugging
|
252
|
+
@api_client.config.logger.debug 'Calling API: AccountApi.account_passwd ...'
|
253
|
+
end
|
254
|
+
# verify the required parameter 'password' is set
|
255
|
+
if @api_client.config.client_side_validation && password.nil?
|
256
|
+
fail ArgumentError, "Missing the required parameter 'password' when calling AccountApi.account_passwd"
|
257
|
+
end
|
258
|
+
# verify the required parameter 'new_password' is set
|
259
|
+
if @api_client.config.client_side_validation && new_password.nil?
|
260
|
+
fail ArgumentError, "Missing the required parameter 'new_password' when calling AccountApi.account_passwd"
|
261
|
+
end
|
262
|
+
# resource path
|
263
|
+
local_var_path = '/account/passwd'
|
264
|
+
|
265
|
+
# query parameters
|
266
|
+
query_params = opts[:query_params] || {}
|
267
|
+
|
268
|
+
# header parameters
|
269
|
+
header_params = opts[:header_params] || {}
|
270
|
+
# HTTP header 'Accept' (if needed)
|
271
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
272
|
+
# HTTP header 'Content-Type'
|
273
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
|
274
|
+
|
275
|
+
# form parameters
|
276
|
+
form_params = opts[:form_params] || {}
|
277
|
+
form_params['password'] = password
|
278
|
+
form_params['newPassword'] = new_password
|
279
|
+
|
280
|
+
# http body (model)
|
281
|
+
post_body = opts[:body]
|
282
|
+
|
283
|
+
return_type = opts[:return_type] || 'BOOLEAN'
|
284
|
+
|
285
|
+
auth_names = opts[:auth_names] || ['TokenAuth']
|
286
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
287
|
+
:header_params => header_params,
|
288
|
+
:query_params => query_params,
|
289
|
+
:form_params => form_params,
|
290
|
+
:body => post_body,
|
291
|
+
:auth_names => auth_names,
|
292
|
+
:return_type => return_type)
|
293
|
+
|
294
|
+
if @api_client.config.debugging
|
295
|
+
@api_client.config.logger.debug "API called: AccountApi#account_passwd\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
296
|
+
end
|
297
|
+
return data, status_code, headers
|
298
|
+
end
|
299
|
+
# 修改账号头像
|
300
|
+
# @param portrait
|
301
|
+
# @param [Hash] opts the optional parameters
|
302
|
+
# @return [AccountBean]
|
303
|
+
def account_portrait(portrait, opts = {})
|
304
|
+
data, _status_code, _headers = account_portrait_with_http_info(portrait, opts)
|
305
|
+
data
|
306
|
+
end
|
307
|
+
|
308
|
+
# 修改账号头像
|
309
|
+
# @param portrait
|
310
|
+
# @param [Hash] opts the optional parameters
|
311
|
+
# @return [Array<(AccountBean, Integer, Hash)>] AccountBean data, response status code and response headers
|
312
|
+
def account_portrait_with_http_info(portrait, opts = {})
|
313
|
+
if @api_client.config.debugging
|
314
|
+
@api_client.config.logger.debug 'Calling API: AccountApi.account_portrait ...'
|
315
|
+
end
|
316
|
+
# verify the required parameter 'portrait' is set
|
317
|
+
if @api_client.config.client_side_validation && portrait.nil?
|
318
|
+
fail ArgumentError, "Missing the required parameter 'portrait' when calling AccountApi.account_portrait"
|
319
|
+
end
|
320
|
+
# resource path
|
321
|
+
local_var_path = '/account/portrait'
|
322
|
+
|
323
|
+
# query parameters
|
324
|
+
query_params = opts[:query_params] || {}
|
325
|
+
|
326
|
+
# header parameters
|
327
|
+
header_params = opts[:header_params] || {}
|
328
|
+
# HTTP header 'Accept' (if needed)
|
329
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
330
|
+
# HTTP header 'Content-Type'
|
331
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
332
|
+
|
333
|
+
# form parameters
|
334
|
+
form_params = opts[:form_params] || {}
|
335
|
+
form_params['portrait'] = portrait
|
336
|
+
|
337
|
+
# http body (model)
|
338
|
+
post_body = opts[:body]
|
339
|
+
|
340
|
+
return_type = opts[:return_type] || 'AccountBean'
|
341
|
+
|
342
|
+
auth_names = opts[:auth_names] || ['TokenAuth']
|
343
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
344
|
+
:header_params => header_params,
|
345
|
+
:query_params => query_params,
|
346
|
+
:form_params => form_params,
|
347
|
+
:body => post_body,
|
348
|
+
:auth_names => auth_names,
|
349
|
+
:return_type => return_type)
|
350
|
+
|
351
|
+
if @api_client.config.debugging
|
352
|
+
@api_client.config.logger.debug "API called: AccountApi#account_portrait\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
353
|
+
end
|
354
|
+
return data, status_code, headers
|
355
|
+
end
|
356
|
+
# 获取登录账号信息
|
357
|
+
# @param [Hash] opts the optional parameters
|
358
|
+
# @option opts [String] :account 获取指定账号信息,如果不指定,则返回当前登录账号
|
359
|
+
# @return [AccountBean]
|
360
|
+
def account_profile(opts = {})
|
361
|
+
data, _status_code, _headers = account_profile_with_http_info(opts)
|
362
|
+
data
|
363
|
+
end
|
364
|
+
|
365
|
+
# 获取登录账号信息
|
366
|
+
# @param [Hash] opts the optional parameters
|
367
|
+
# @option opts [String] :account 获取指定账号信息,如果不指定,则返回当前登录账号
|
368
|
+
# @return [Array<(AccountBean, Integer, Hash)>] AccountBean data, response status code and response headers
|
369
|
+
def account_profile_with_http_info(opts = {})
|
370
|
+
if @api_client.config.debugging
|
371
|
+
@api_client.config.logger.debug 'Calling API: AccountApi.account_profile ...'
|
372
|
+
end
|
373
|
+
# resource path
|
374
|
+
local_var_path = '/account/profile'
|
375
|
+
|
376
|
+
# query parameters
|
377
|
+
query_params = opts[:query_params] || {}
|
378
|
+
query_params[:'account'] = opts[:'account'] if !opts[:'account'].nil?
|
379
|
+
|
380
|
+
# header parameters
|
381
|
+
header_params = opts[:header_params] || {}
|
382
|
+
# HTTP header 'Accept' (if needed)
|
383
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
384
|
+
|
385
|
+
# form parameters
|
386
|
+
form_params = opts[:form_params] || {}
|
387
|
+
|
388
|
+
# http body (model)
|
389
|
+
post_body = opts[:body]
|
390
|
+
|
391
|
+
return_type = opts[:return_type] || 'AccountBean'
|
392
|
+
|
393
|
+
auth_names = opts[:auth_names] || ['TokenAuth']
|
394
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
395
|
+
:header_params => header_params,
|
396
|
+
:query_params => query_params,
|
397
|
+
:form_params => form_params,
|
398
|
+
:body => post_body,
|
399
|
+
:auth_names => auth_names,
|
400
|
+
:return_type => return_type)
|
401
|
+
|
402
|
+
if @api_client.config.debugging
|
403
|
+
@api_client.config.logger.debug "API called: AccountApi#account_profile\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
404
|
+
end
|
405
|
+
return data, status_code, headers
|
406
|
+
end
|
407
|
+
# 重置账号密码
|
408
|
+
# @param [Hash] opts the optional parameters
|
409
|
+
# @option opts [String] :account
|
410
|
+
# @option opts [String] :verify_code
|
411
|
+
# @option opts [String] :pwd
|
412
|
+
# @return [BOOLEAN]
|
413
|
+
def account_reset_pwd(opts = {})
|
414
|
+
data, _status_code, _headers = account_reset_pwd_with_http_info(opts)
|
415
|
+
data
|
416
|
+
end
|
417
|
+
|
418
|
+
# 重置账号密码
|
419
|
+
# @param [Hash] opts the optional parameters
|
420
|
+
# @option opts [String] :account
|
421
|
+
# @option opts [String] :verify_code
|
422
|
+
# @option opts [String] :pwd
|
423
|
+
# @return [Array<(BOOLEAN, Integer, Hash)>] BOOLEAN data, response status code and response headers
|
424
|
+
def account_reset_pwd_with_http_info(opts = {})
|
425
|
+
if @api_client.config.debugging
|
426
|
+
@api_client.config.logger.debug 'Calling API: AccountApi.account_reset_pwd ...'
|
427
|
+
end
|
428
|
+
# resource path
|
429
|
+
local_var_path = '/account/reset-pwd'
|
430
|
+
|
431
|
+
# query parameters
|
432
|
+
query_params = opts[:query_params] || {}
|
433
|
+
|
434
|
+
# header parameters
|
435
|
+
header_params = opts[:header_params] || {}
|
436
|
+
# HTTP header 'Accept' (if needed)
|
437
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
438
|
+
# HTTP header 'Content-Type'
|
439
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
|
440
|
+
|
441
|
+
# form parameters
|
442
|
+
form_params = opts[:form_params] || {}
|
443
|
+
form_params['account'] = opts[:'account'] if !opts[:'account'].nil?
|
444
|
+
form_params['verifyCode'] = opts[:'verify_code'] if !opts[:'verify_code'].nil?
|
445
|
+
form_params['pwd'] = opts[:'pwd'] if !opts[:'pwd'].nil?
|
446
|
+
|
447
|
+
# http body (model)
|
448
|
+
post_body = opts[:body]
|
449
|
+
|
450
|
+
return_type = opts[:return_type] || 'BOOLEAN'
|
451
|
+
|
452
|
+
auth_names = opts[:auth_names] || []
|
453
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
454
|
+
:header_params => header_params,
|
455
|
+
:query_params => query_params,
|
456
|
+
:form_params => form_params,
|
457
|
+
:body => post_body,
|
458
|
+
:auth_names => auth_names,
|
459
|
+
:return_type => return_type)
|
460
|
+
|
461
|
+
if @api_client.config.debugging
|
462
|
+
@api_client.config.logger.debug "API called: AccountApi#account_reset_pwd\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
463
|
+
end
|
464
|
+
return data, status_code, headers
|
465
|
+
end
|
466
|
+
# 发送账号验证码
|
467
|
+
# @param account 账号
|
468
|
+
# @param purpose 验证码的用途
|
469
|
+
# @param [Hash] opts the optional parameters
|
470
|
+
# @return [BOOLEAN]
|
471
|
+
def account_send_verify_code(account, purpose, opts = {})
|
472
|
+
data, _status_code, _headers = account_send_verify_code_with_http_info(account, purpose, opts)
|
473
|
+
data
|
474
|
+
end
|
475
|
+
|
476
|
+
# 发送账号验证码
|
477
|
+
# @param account 账号
|
478
|
+
# @param purpose 验证码的用途
|
479
|
+
# @param [Hash] opts the optional parameters
|
480
|
+
# @return [Array<(BOOLEAN, Integer, Hash)>] BOOLEAN data, response status code and response headers
|
481
|
+
def account_send_verify_code_with_http_info(account, purpose, opts = {})
|
482
|
+
if @api_client.config.debugging
|
483
|
+
@api_client.config.logger.debug 'Calling API: AccountApi.account_send_verify_code ...'
|
484
|
+
end
|
485
|
+
# verify the required parameter 'account' is set
|
486
|
+
if @api_client.config.client_side_validation && account.nil?
|
487
|
+
fail ArgumentError, "Missing the required parameter 'account' when calling AccountApi.account_send_verify_code"
|
488
|
+
end
|
489
|
+
# verify the required parameter 'purpose' is set
|
490
|
+
if @api_client.config.client_side_validation && purpose.nil?
|
491
|
+
fail ArgumentError, "Missing the required parameter 'purpose' when calling AccountApi.account_send_verify_code"
|
492
|
+
end
|
493
|
+
# resource path
|
494
|
+
local_var_path = '/account/send-verify-code'
|
495
|
+
|
496
|
+
# query parameters
|
497
|
+
query_params = opts[:query_params] || {}
|
498
|
+
query_params[:'account'] = account
|
499
|
+
query_params[:'purpose'] = purpose
|
500
|
+
|
501
|
+
# header parameters
|
502
|
+
header_params = opts[:header_params] || {}
|
503
|
+
# HTTP header 'Accept' (if needed)
|
504
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
505
|
+
|
506
|
+
# form parameters
|
507
|
+
form_params = opts[:form_params] || {}
|
508
|
+
|
509
|
+
# http body (model)
|
510
|
+
post_body = opts[:body]
|
511
|
+
|
512
|
+
return_type = opts[:return_type] || 'BOOLEAN'
|
513
|
+
|
514
|
+
auth_names = opts[:auth_names] || []
|
515
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
516
|
+
:header_params => header_params,
|
517
|
+
:query_params => query_params,
|
518
|
+
:form_params => form_params,
|
519
|
+
:body => post_body,
|
520
|
+
:auth_names => auth_names,
|
521
|
+
:return_type => return_type)
|
522
|
+
|
523
|
+
if @api_client.config.debugging
|
524
|
+
@api_client.config.logger.debug "API called: AccountApi#account_send_verify_code\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
525
|
+
end
|
526
|
+
return data, status_code, headers
|
527
|
+
end
|
528
|
+
# 登录系统
|
529
|
+
# @param account
|
530
|
+
# @param pwd
|
531
|
+
# @param keep_login
|
532
|
+
# @param [Hash] opts the optional parameters
|
533
|
+
# @return [AccountBean]
|
534
|
+
def account_signin(account, pwd, keep_login, opts = {})
|
535
|
+
data, _status_code, _headers = account_signin_with_http_info(account, pwd, keep_login, opts)
|
536
|
+
data
|
537
|
+
end
|
538
|
+
|
539
|
+
# 登录系统
|
540
|
+
# @param account
|
541
|
+
# @param pwd
|
542
|
+
# @param keep_login
|
543
|
+
# @param [Hash] opts the optional parameters
|
544
|
+
# @return [Array<(AccountBean, Integer, Hash)>] AccountBean data, response status code and response headers
|
545
|
+
def account_signin_with_http_info(account, pwd, keep_login, opts = {})
|
546
|
+
if @api_client.config.debugging
|
547
|
+
@api_client.config.logger.debug 'Calling API: AccountApi.account_signin ...'
|
548
|
+
end
|
549
|
+
# verify the required parameter 'account' is set
|
550
|
+
if @api_client.config.client_side_validation && account.nil?
|
551
|
+
fail ArgumentError, "Missing the required parameter 'account' when calling AccountApi.account_signin"
|
552
|
+
end
|
553
|
+
# verify the required parameter 'pwd' is set
|
554
|
+
if @api_client.config.client_side_validation && pwd.nil?
|
555
|
+
fail ArgumentError, "Missing the required parameter 'pwd' when calling AccountApi.account_signin"
|
556
|
+
end
|
557
|
+
# verify the required parameter 'keep_login' is set
|
558
|
+
if @api_client.config.client_side_validation && keep_login.nil?
|
559
|
+
fail ArgumentError, "Missing the required parameter 'keep_login' when calling AccountApi.account_signin"
|
560
|
+
end
|
561
|
+
# resource path
|
562
|
+
local_var_path = '/account/signin'
|
563
|
+
|
564
|
+
# query parameters
|
565
|
+
query_params = opts[:query_params] || {}
|
566
|
+
|
567
|
+
# header parameters
|
568
|
+
header_params = opts[:header_params] || {}
|
569
|
+
# HTTP header 'Accept' (if needed)
|
570
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
571
|
+
# HTTP header 'Content-Type'
|
572
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
|
573
|
+
|
574
|
+
# form parameters
|
575
|
+
form_params = opts[:form_params] || {}
|
576
|
+
form_params['account'] = account
|
577
|
+
form_params['pwd'] = pwd
|
578
|
+
form_params['keep_login'] = keep_login
|
579
|
+
|
580
|
+
# http body (model)
|
581
|
+
post_body = opts[:body]
|
582
|
+
|
583
|
+
return_type = opts[:return_type] || 'AccountBean'
|
584
|
+
|
585
|
+
auth_names = opts[:auth_names] || []
|
586
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
587
|
+
:header_params => header_params,
|
588
|
+
:query_params => query_params,
|
589
|
+
:form_params => form_params,
|
590
|
+
:body => post_body,
|
591
|
+
:auth_names => auth_names,
|
592
|
+
:return_type => return_type)
|
593
|
+
|
594
|
+
if @api_client.config.debugging
|
595
|
+
@api_client.config.logger.debug "API called: AccountApi#account_signin\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
596
|
+
end
|
597
|
+
return data, status_code, headers
|
598
|
+
end
|
599
|
+
# 退出登录状态
|
600
|
+
# @param [Hash] opts the optional parameters
|
601
|
+
# @return [nil]
|
602
|
+
def account_signout(opts = {})
|
603
|
+
account_signout_with_http_info(opts)
|
604
|
+
nil
|
605
|
+
end
|
606
|
+
|
607
|
+
# 退出登录状态
|
608
|
+
# @param [Hash] opts the optional parameters
|
609
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
610
|
+
def account_signout_with_http_info(opts = {})
|
611
|
+
if @api_client.config.debugging
|
612
|
+
@api_client.config.logger.debug 'Calling API: AccountApi.account_signout ...'
|
613
|
+
end
|
614
|
+
# resource path
|
615
|
+
local_var_path = '/account/sign-out'
|
616
|
+
|
617
|
+
# query parameters
|
618
|
+
query_params = opts[:query_params] || {}
|
619
|
+
|
620
|
+
# header parameters
|
621
|
+
header_params = opts[:header_params] || {}
|
622
|
+
|
623
|
+
# form parameters
|
624
|
+
form_params = opts[:form_params] || {}
|
625
|
+
|
626
|
+
# http body (model)
|
627
|
+
post_body = opts[:body]
|
628
|
+
|
629
|
+
return_type = opts[:return_type]
|
630
|
+
|
631
|
+
auth_names = opts[:auth_names] || ['TokenAuth']
|
632
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
633
|
+
:header_params => header_params,
|
634
|
+
:query_params => query_params,
|
635
|
+
:form_params => form_params,
|
636
|
+
:body => post_body,
|
637
|
+
:auth_names => auth_names,
|
638
|
+
:return_type => return_type)
|
639
|
+
|
640
|
+
if @api_client.config.debugging
|
641
|
+
@api_client.config.logger.debug "API called: AccountApi#account_signout\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
642
|
+
end
|
643
|
+
return data, status_code, headers
|
644
|
+
end
|
645
|
+
# 注册新账号
|
646
|
+
# @param [Hash] opts the optional parameters
|
647
|
+
# @option opts [String] :account
|
648
|
+
# @option opts [String] :pwd
|
649
|
+
# @option opts [String] :name
|
650
|
+
# @option opts [String] :activate_code
|
651
|
+
# @return [AccountBean]
|
652
|
+
def account_signup(opts = {})
|
653
|
+
data, _status_code, _headers = account_signup_with_http_info(opts)
|
654
|
+
data
|
655
|
+
end
|
656
|
+
|
657
|
+
# 注册新账号
|
658
|
+
# @param [Hash] opts the optional parameters
|
659
|
+
# @option opts [String] :account
|
660
|
+
# @option opts [String] :pwd
|
661
|
+
# @option opts [String] :name
|
662
|
+
# @option opts [String] :activate_code
|
663
|
+
# @return [Array<(AccountBean, Integer, Hash)>] AccountBean data, response status code and response headers
|
664
|
+
def account_signup_with_http_info(opts = {})
|
665
|
+
if @api_client.config.debugging
|
666
|
+
@api_client.config.logger.debug 'Calling API: AccountApi.account_signup ...'
|
667
|
+
end
|
668
|
+
# resource path
|
669
|
+
local_var_path = '/account/signup'
|
670
|
+
|
671
|
+
# query parameters
|
672
|
+
query_params = opts[:query_params] || {}
|
673
|
+
|
674
|
+
# header parameters
|
675
|
+
header_params = opts[:header_params] || {}
|
676
|
+
# HTTP header 'Accept' (if needed)
|
677
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
678
|
+
# HTTP header 'Content-Type'
|
679
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
|
680
|
+
|
681
|
+
# form parameters
|
682
|
+
form_params = opts[:form_params] || {}
|
683
|
+
form_params['account'] = opts[:'account'] if !opts[:'account'].nil?
|
684
|
+
form_params['pwd'] = opts[:'pwd'] if !opts[:'pwd'].nil?
|
685
|
+
form_params['name'] = opts[:'name'] if !opts[:'name'].nil?
|
686
|
+
form_params['activate_code'] = opts[:'activate_code'] if !opts[:'activate_code'].nil?
|
687
|
+
|
688
|
+
# http body (model)
|
689
|
+
post_body = opts[:body]
|
690
|
+
|
691
|
+
return_type = opts[:return_type] || 'AccountBean'
|
692
|
+
|
693
|
+
auth_names = opts[:auth_names] || []
|
694
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
695
|
+
:header_params => header_params,
|
696
|
+
:query_params => query_params,
|
697
|
+
:form_params => form_params,
|
698
|
+
:body => post_body,
|
699
|
+
:auth_names => auth_names,
|
700
|
+
:return_type => return_type)
|
701
|
+
|
702
|
+
if @api_client.config.debugging
|
703
|
+
@api_client.config.logger.debug "API called: AccountApi#account_signup\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
704
|
+
end
|
705
|
+
return data, status_code, headers
|
706
|
+
end
|
707
|
+
# 修改账号资料
|
708
|
+
# @param body
|
709
|
+
# @param [Hash] opts the optional parameters
|
710
|
+
# @return [AccountBean]
|
711
|
+
def account_update(body, opts = {})
|
712
|
+
data, _status_code, _headers = account_update_with_http_info(body, opts)
|
713
|
+
data
|
714
|
+
end
|
715
|
+
|
716
|
+
# 修改账号资料
|
717
|
+
# @param body
|
718
|
+
# @param [Hash] opts the optional parameters
|
719
|
+
# @return [Array<(AccountBean, Integer, Hash)>] AccountBean data, response status code and response headers
|
720
|
+
def account_update_with_http_info(body, opts = {})
|
721
|
+
if @api_client.config.debugging
|
722
|
+
@api_client.config.logger.debug 'Calling API: AccountApi.account_update ...'
|
723
|
+
end
|
724
|
+
# verify the required parameter 'body' is set
|
725
|
+
if @api_client.config.client_side_validation && body.nil?
|
726
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling AccountApi.account_update"
|
727
|
+
end
|
728
|
+
# resource path
|
729
|
+
local_var_path = '/account/profile'
|
730
|
+
|
731
|
+
# query parameters
|
732
|
+
query_params = opts[:query_params] || {}
|
733
|
+
|
734
|
+
# header parameters
|
735
|
+
header_params = opts[:header_params] || {}
|
736
|
+
# HTTP header 'Accept' (if needed)
|
737
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
738
|
+
# HTTP header 'Content-Type'
|
739
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
740
|
+
|
741
|
+
# form parameters
|
742
|
+
form_params = opts[:form_params] || {}
|
743
|
+
|
744
|
+
# http body (model)
|
745
|
+
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
746
|
+
|
747
|
+
return_type = opts[:return_type] || 'AccountBean'
|
748
|
+
|
749
|
+
auth_names = opts[:auth_names] || ['TokenAuth']
|
750
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
751
|
+
:header_params => header_params,
|
752
|
+
:query_params => query_params,
|
753
|
+
:form_params => form_params,
|
754
|
+
:body => post_body,
|
755
|
+
:auth_names => auth_names,
|
756
|
+
:return_type => return_type)
|
757
|
+
|
758
|
+
if @api_client.config.debugging
|
759
|
+
@api_client.config.logger.debug "API called: AccountApi#account_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
760
|
+
end
|
761
|
+
return data, status_code, headers
|
762
|
+
end
|
763
|
+
# 修改账号设置
|
764
|
+
# @param key
|
765
|
+
# @param type
|
766
|
+
# @param value
|
767
|
+
# @param vcode
|
768
|
+
# @param [Hash] opts the optional parameters
|
769
|
+
# @return [BOOLEAN]
|
770
|
+
def account_update_settings(key, type, value, vcode, opts = {})
|
771
|
+
data, _status_code, _headers = account_update_settings_with_http_info(key, type, value, vcode, opts)
|
772
|
+
data
|
773
|
+
end
|
774
|
+
|
775
|
+
# 修改账号设置
|
776
|
+
# @param key
|
777
|
+
# @param type
|
778
|
+
# @param value
|
779
|
+
# @param vcode
|
780
|
+
# @param [Hash] opts the optional parameters
|
781
|
+
# @return [Array<(BOOLEAN, Integer, Hash)>] BOOLEAN data, response status code and response headers
|
782
|
+
def account_update_settings_with_http_info(key, type, value, vcode, opts = {})
|
783
|
+
if @api_client.config.debugging
|
784
|
+
@api_client.config.logger.debug 'Calling API: AccountApi.account_update_settings ...'
|
785
|
+
end
|
786
|
+
# verify the required parameter 'key' is set
|
787
|
+
if @api_client.config.client_side_validation && key.nil?
|
788
|
+
fail ArgumentError, "Missing the required parameter 'key' when calling AccountApi.account_update_settings"
|
789
|
+
end
|
790
|
+
# verify the required parameter 'type' is set
|
791
|
+
if @api_client.config.client_side_validation && type.nil?
|
792
|
+
fail ArgumentError, "Missing the required parameter 'type' when calling AccountApi.account_update_settings"
|
793
|
+
end
|
794
|
+
# verify enum value
|
795
|
+
if @api_client.config.client_side_validation && !['int', 'bool', 'string'].include?(type)
|
796
|
+
fail ArgumentError, "invalid value for 'type', must be one of int, bool, string"
|
797
|
+
end
|
798
|
+
# verify the required parameter 'value' is set
|
799
|
+
if @api_client.config.client_side_validation && value.nil?
|
800
|
+
fail ArgumentError, "Missing the required parameter 'value' when calling AccountApi.account_update_settings"
|
801
|
+
end
|
802
|
+
# verify the required parameter 'vcode' is set
|
803
|
+
if @api_client.config.client_side_validation && vcode.nil?
|
804
|
+
fail ArgumentError, "Missing the required parameter 'vcode' when calling AccountApi.account_update_settings"
|
805
|
+
end
|
806
|
+
# resource path
|
807
|
+
local_var_path = '/account/settings'
|
808
|
+
|
809
|
+
# query parameters
|
810
|
+
query_params = opts[:query_params] || {}
|
811
|
+
|
812
|
+
# header parameters
|
813
|
+
header_params = opts[:header_params] || {}
|
814
|
+
# HTTP header 'Accept' (if needed)
|
815
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
816
|
+
# HTTP header 'Content-Type'
|
817
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
|
818
|
+
|
819
|
+
# form parameters
|
820
|
+
form_params = opts[:form_params] || {}
|
821
|
+
form_params['key'] = key
|
822
|
+
form_params['type'] = type
|
823
|
+
form_params['value'] = value
|
824
|
+
form_params['vcode'] = vcode
|
825
|
+
|
826
|
+
# http body (model)
|
827
|
+
post_body = opts[:body]
|
828
|
+
|
829
|
+
return_type = opts[:return_type] || 'BOOLEAN'
|
830
|
+
|
831
|
+
auth_names = opts[:auth_names] || ['TokenAuth']
|
832
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
833
|
+
:header_params => header_params,
|
834
|
+
:query_params => query_params,
|
835
|
+
:form_params => form_params,
|
836
|
+
:body => post_body,
|
837
|
+
:auth_names => auth_names,
|
838
|
+
:return_type => return_type)
|
839
|
+
|
840
|
+
if @api_client.config.debugging
|
841
|
+
@api_client.config.logger.debug "API called: AccountApi#account_update_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
842
|
+
end
|
843
|
+
return data, status_code, headers
|
844
|
+
end
|
845
|
+
end
|
846
|
+
end
|