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,461 @@
|
|
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 RecommendApi
|
14
|
+
attr_accessor :api_client
|
15
|
+
|
16
|
+
def initialize(api_client = ApiClient.default)
|
17
|
+
@api_client = api_client
|
18
|
+
end
|
19
|
+
# 推荐结果点击行为收集
|
20
|
+
# 该接口主要用于记录用户对推荐结果的点击行为
|
21
|
+
# @param ident 推荐的唯一标识
|
22
|
+
# @param action_id 对应推荐行为编号
|
23
|
+
# @param doc_id 对应索引中的内部记录编号
|
24
|
+
# @param [Hash] opts the optional parameters
|
25
|
+
# @option opts [String] :userid 搜索者的唯一标识,该标识由搜索前端生成,长度不超过64
|
26
|
+
# @option opts [String] :x_token 如果要使用非发布的组件,需要组件作者授权
|
27
|
+
# @return [BOOLEAN]
|
28
|
+
def recommend_click(ident, action_id, doc_id, opts = {})
|
29
|
+
data, _status_code, _headers = recommend_click_with_http_info(ident, action_id, doc_id, opts)
|
30
|
+
data
|
31
|
+
end
|
32
|
+
|
33
|
+
# 推荐结果点击行为收集
|
34
|
+
# 该接口主要用于记录用户对推荐结果的点击行为
|
35
|
+
# @param ident 推荐的唯一标识
|
36
|
+
# @param action_id 对应推荐行为编号
|
37
|
+
# @param doc_id 对应索引中的内部记录编号
|
38
|
+
# @param [Hash] opts the optional parameters
|
39
|
+
# @option opts [String] :userid 搜索者的唯一标识,该标识由搜索前端生成,长度不超过64
|
40
|
+
# @option opts [String] :x_token 如果要使用非发布的组件,需要组件作者授权
|
41
|
+
# @return [Array<(BOOLEAN, Integer, Hash)>] BOOLEAN data, response status code and response headers
|
42
|
+
def recommend_click_with_http_info(ident, action_id, doc_id, opts = {})
|
43
|
+
if @api_client.config.debugging
|
44
|
+
@api_client.config.logger.debug 'Calling API: RecommendApi.recommend_click ...'
|
45
|
+
end
|
46
|
+
# verify the required parameter 'ident' is set
|
47
|
+
if @api_client.config.client_side_validation && ident.nil?
|
48
|
+
fail ArgumentError, "Missing the required parameter 'ident' when calling RecommendApi.recommend_click"
|
49
|
+
end
|
50
|
+
# verify the required parameter 'action_id' is set
|
51
|
+
if @api_client.config.client_side_validation && action_id.nil?
|
52
|
+
fail ArgumentError, "Missing the required parameter 'action_id' when calling RecommendApi.recommend_click"
|
53
|
+
end
|
54
|
+
# verify the required parameter 'doc_id' is set
|
55
|
+
if @api_client.config.client_side_validation && doc_id.nil?
|
56
|
+
fail ArgumentError, "Missing the required parameter 'doc_id' when calling RecommendApi.recommend_click"
|
57
|
+
end
|
58
|
+
# resource path
|
59
|
+
local_var_path = '/recommend/{ident}/click'.sub('{' + 'ident' + '}', ident.to_s)
|
60
|
+
|
61
|
+
# query parameters
|
62
|
+
query_params = opts[:query_params] || {}
|
63
|
+
query_params[:'action_id'] = action_id
|
64
|
+
query_params[:'doc_id'] = doc_id
|
65
|
+
|
66
|
+
# header parameters
|
67
|
+
header_params = opts[:header_params] || {}
|
68
|
+
# HTTP header 'Accept' (if needed)
|
69
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
70
|
+
header_params[:'userid'] = opts[:'userid'] if !opts[:'userid'].nil?
|
71
|
+
header_params[:'x-token'] = opts[:'x_token'] if !opts[:'x_token'].nil?
|
72
|
+
|
73
|
+
# form parameters
|
74
|
+
form_params = opts[:form_params] || {}
|
75
|
+
|
76
|
+
# http body (model)
|
77
|
+
post_body = opts[:body]
|
78
|
+
|
79
|
+
return_type = opts[:return_type] || 'BOOLEAN'
|
80
|
+
|
81
|
+
auth_names = opts[:auth_names] || []
|
82
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
83
|
+
:header_params => header_params,
|
84
|
+
:query_params => query_params,
|
85
|
+
:form_params => form_params,
|
86
|
+
:body => post_body,
|
87
|
+
:auth_names => auth_names,
|
88
|
+
:return_type => return_type)
|
89
|
+
|
90
|
+
if @api_client.config.debugging
|
91
|
+
@api_client.config.logger.debug "API called: RecommendApi#recommend_click\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
92
|
+
end
|
93
|
+
return data, status_code, headers
|
94
|
+
end
|
95
|
+
# 创建新的推荐
|
96
|
+
# @param body 推荐信息
|
97
|
+
# @param app 应用标识
|
98
|
+
# @param [Hash] opts the optional parameters
|
99
|
+
# @return [RecommendBean]
|
100
|
+
def recommend_create(body, app, opts = {})
|
101
|
+
data, _status_code, _headers = recommend_create_with_http_info(body, app, opts)
|
102
|
+
data
|
103
|
+
end
|
104
|
+
|
105
|
+
# 创建新的推荐
|
106
|
+
# @param body 推荐信息
|
107
|
+
# @param app 应用标识
|
108
|
+
# @param [Hash] opts the optional parameters
|
109
|
+
# @return [Array<(RecommendBean, Integer, Hash)>] RecommendBean data, response status code and response headers
|
110
|
+
def recommend_create_with_http_info(body, app, opts = {})
|
111
|
+
if @api_client.config.debugging
|
112
|
+
@api_client.config.logger.debug 'Calling API: RecommendApi.recommend_create ...'
|
113
|
+
end
|
114
|
+
# verify the required parameter 'body' is set
|
115
|
+
if @api_client.config.client_side_validation && body.nil?
|
116
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling RecommendApi.recommend_create"
|
117
|
+
end
|
118
|
+
# verify the required parameter 'app' is set
|
119
|
+
if @api_client.config.client_side_validation && app.nil?
|
120
|
+
fail ArgumentError, "Missing the required parameter 'app' when calling RecommendApi.recommend_create"
|
121
|
+
end
|
122
|
+
# resource path
|
123
|
+
local_var_path = '/recommends/{app}'.sub('{' + 'app' + '}', app.to_s)
|
124
|
+
|
125
|
+
# query parameters
|
126
|
+
query_params = opts[:query_params] || {}
|
127
|
+
|
128
|
+
# header parameters
|
129
|
+
header_params = opts[:header_params] || {}
|
130
|
+
# HTTP header 'Accept' (if needed)
|
131
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
132
|
+
# HTTP header 'Content-Type'
|
133
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
134
|
+
|
135
|
+
# form parameters
|
136
|
+
form_params = opts[:form_params] || {}
|
137
|
+
|
138
|
+
# http body (model)
|
139
|
+
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
140
|
+
|
141
|
+
return_type = opts[:return_type] || 'RecommendBean'
|
142
|
+
|
143
|
+
auth_names = opts[:auth_names] || ['TokenAuth']
|
144
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
145
|
+
:header_params => header_params,
|
146
|
+
:query_params => query_params,
|
147
|
+
:form_params => form_params,
|
148
|
+
:body => post_body,
|
149
|
+
:auth_names => auth_names,
|
150
|
+
:return_type => return_type)
|
151
|
+
|
152
|
+
if @api_client.config.debugging
|
153
|
+
@api_client.config.logger.debug "API called: RecommendApi#recommend_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
154
|
+
end
|
155
|
+
return data, status_code, headers
|
156
|
+
end
|
157
|
+
# 删除推荐
|
158
|
+
# @param app 应用标识
|
159
|
+
# @param id 推荐编号
|
160
|
+
# @param [Hash] opts the optional parameters
|
161
|
+
# @return [BOOLEAN]
|
162
|
+
def recommend_delete(app, id, opts = {})
|
163
|
+
data, _status_code, _headers = recommend_delete_with_http_info(app, id, opts)
|
164
|
+
data
|
165
|
+
end
|
166
|
+
|
167
|
+
# 删除推荐
|
168
|
+
# @param app 应用标识
|
169
|
+
# @param id 推荐编号
|
170
|
+
# @param [Hash] opts the optional parameters
|
171
|
+
# @return [Array<(BOOLEAN, Integer, Hash)>] BOOLEAN data, response status code and response headers
|
172
|
+
def recommend_delete_with_http_info(app, id, opts = {})
|
173
|
+
if @api_client.config.debugging
|
174
|
+
@api_client.config.logger.debug 'Calling API: RecommendApi.recommend_delete ...'
|
175
|
+
end
|
176
|
+
# verify the required parameter 'app' is set
|
177
|
+
if @api_client.config.client_side_validation && app.nil?
|
178
|
+
fail ArgumentError, "Missing the required parameter 'app' when calling RecommendApi.recommend_delete"
|
179
|
+
end
|
180
|
+
# verify the required parameter 'id' is set
|
181
|
+
if @api_client.config.client_side_validation && id.nil?
|
182
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling RecommendApi.recommend_delete"
|
183
|
+
end
|
184
|
+
# resource path
|
185
|
+
local_var_path = '/recommends/{app}'.sub('{' + 'app' + '}', app.to_s)
|
186
|
+
|
187
|
+
# query parameters
|
188
|
+
query_params = opts[:query_params] || {}
|
189
|
+
query_params[:'id'] = id
|
190
|
+
|
191
|
+
# header parameters
|
192
|
+
header_params = opts[:header_params] || {}
|
193
|
+
# HTTP header 'Accept' (if needed)
|
194
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
195
|
+
|
196
|
+
# form parameters
|
197
|
+
form_params = opts[:form_params] || {}
|
198
|
+
|
199
|
+
# http body (model)
|
200
|
+
post_body = opts[:body]
|
201
|
+
|
202
|
+
return_type = opts[:return_type] || 'BOOLEAN'
|
203
|
+
|
204
|
+
auth_names = opts[:auth_names] || ['TokenAuth']
|
205
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
206
|
+
:header_params => header_params,
|
207
|
+
:query_params => query_params,
|
208
|
+
:form_params => form_params,
|
209
|
+
:body => post_body,
|
210
|
+
:auth_names => auth_names,
|
211
|
+
:return_type => return_type)
|
212
|
+
|
213
|
+
if @api_client.config.debugging
|
214
|
+
@api_client.config.logger.debug "API called: RecommendApi#recommend_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
215
|
+
end
|
216
|
+
return data, status_code, headers
|
217
|
+
end
|
218
|
+
# 获取推荐的记录列表
|
219
|
+
# @param ident 推荐定义的标识
|
220
|
+
# @param [Hash] opts the optional parameters
|
221
|
+
# @option opts [String] :x_token 如果要使用非发布的组件,需要组件作者授权
|
222
|
+
# @return [RecommendBean]
|
223
|
+
def recommend_detail(ident, opts = {})
|
224
|
+
data, _status_code, _headers = recommend_detail_with_http_info(ident, opts)
|
225
|
+
data
|
226
|
+
end
|
227
|
+
|
228
|
+
# 获取推荐的记录列表
|
229
|
+
# @param ident 推荐定义的标识
|
230
|
+
# @param [Hash] opts the optional parameters
|
231
|
+
# @option opts [String] :x_token 如果要使用非发布的组件,需要组件作者授权
|
232
|
+
# @return [Array<(RecommendBean, Integer, Hash)>] RecommendBean data, response status code and response headers
|
233
|
+
def recommend_detail_with_http_info(ident, opts = {})
|
234
|
+
if @api_client.config.debugging
|
235
|
+
@api_client.config.logger.debug 'Calling API: RecommendApi.recommend_detail ...'
|
236
|
+
end
|
237
|
+
# verify the required parameter 'ident' is set
|
238
|
+
if @api_client.config.client_side_validation && ident.nil?
|
239
|
+
fail ArgumentError, "Missing the required parameter 'ident' when calling RecommendApi.recommend_detail"
|
240
|
+
end
|
241
|
+
# resource path
|
242
|
+
local_var_path = '/recommend/{ident}'.sub('{' + 'ident' + '}', ident.to_s)
|
243
|
+
|
244
|
+
# query parameters
|
245
|
+
query_params = opts[:query_params] || {}
|
246
|
+
|
247
|
+
# header parameters
|
248
|
+
header_params = opts[:header_params] || {}
|
249
|
+
# HTTP header 'Accept' (if needed)
|
250
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
251
|
+
header_params[:'x-token'] = opts[:'x_token'] if !opts[:'x_token'].nil?
|
252
|
+
|
253
|
+
# form parameters
|
254
|
+
form_params = opts[:form_params] || {}
|
255
|
+
|
256
|
+
# http body (model)
|
257
|
+
post_body = opts[:body]
|
258
|
+
|
259
|
+
return_type = opts[:return_type] || 'RecommendBean'
|
260
|
+
|
261
|
+
auth_names = opts[:auth_names] || []
|
262
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
263
|
+
:header_params => header_params,
|
264
|
+
:query_params => query_params,
|
265
|
+
:form_params => form_params,
|
266
|
+
:body => post_body,
|
267
|
+
:auth_names => auth_names,
|
268
|
+
:return_type => return_type)
|
269
|
+
|
270
|
+
if @api_client.config.debugging
|
271
|
+
@api_client.config.logger.debug "API called: RecommendApi#recommend_detail\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
272
|
+
end
|
273
|
+
return data, status_code, headers
|
274
|
+
end
|
275
|
+
# 获取推荐的记录列表
|
276
|
+
# @param ident 推荐定义的标识
|
277
|
+
# @param [Hash] opts the optional parameters
|
278
|
+
# @option opts [String] :x_token 如果要使用非发布的组件,需要组件作者授权
|
279
|
+
# @option opts [String] :userid 访客的唯一标识,该标识由搜索前端生成,长度不超过64
|
280
|
+
# @option opts [Hash<String, String>] :condition 获取某个记录的参数,例如 id=11223(后端将使用 term query 进行匹配)
|
281
|
+
# @option opts [Integer] :from 起始值 (default to 0)
|
282
|
+
# @option opts [Integer] :count 推荐的记录数 (default to 10)
|
283
|
+
# @return [Object]
|
284
|
+
def recommend_fetch(ident, opts = {})
|
285
|
+
data, _status_code, _headers = recommend_fetch_with_http_info(ident, opts)
|
286
|
+
data
|
287
|
+
end
|
288
|
+
|
289
|
+
# 获取推荐的记录列表
|
290
|
+
# @param ident 推荐定义的标识
|
291
|
+
# @param [Hash] opts the optional parameters
|
292
|
+
# @option opts [String] :x_token 如果要使用非发布的组件,需要组件作者授权
|
293
|
+
# @option opts [String] :userid 访客的唯一标识,该标识由搜索前端生成,长度不超过64
|
294
|
+
# @option opts [Hash<String, String>] :condition 获取某个记录的参数,例如 id=11223(后端将使用 term query 进行匹配)
|
295
|
+
# @option opts [Integer] :from 起始值
|
296
|
+
# @option opts [Integer] :count 推荐的记录数
|
297
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
298
|
+
def recommend_fetch_with_http_info(ident, opts = {})
|
299
|
+
if @api_client.config.debugging
|
300
|
+
@api_client.config.logger.debug 'Calling API: RecommendApi.recommend_fetch ...'
|
301
|
+
end
|
302
|
+
# verify the required parameter 'ident' is set
|
303
|
+
if @api_client.config.client_side_validation && ident.nil?
|
304
|
+
fail ArgumentError, "Missing the required parameter 'ident' when calling RecommendApi.recommend_fetch"
|
305
|
+
end
|
306
|
+
# resource path
|
307
|
+
local_var_path = '/recommend/{ident}'.sub('{' + 'ident' + '}', ident.to_s)
|
308
|
+
|
309
|
+
# query parameters
|
310
|
+
query_params = opts[:query_params] || {}
|
311
|
+
query_params[:'condition'] = @api_client.build_collection_param(opts[:'condition'], :multi) if !opts[:'condition'].nil?
|
312
|
+
query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil?
|
313
|
+
query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
|
314
|
+
|
315
|
+
# header parameters
|
316
|
+
header_params = opts[:header_params] || {}
|
317
|
+
# HTTP header 'Accept' (if needed)
|
318
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
319
|
+
header_params[:'x-token'] = opts[:'x_token'] if !opts[:'x_token'].nil?
|
320
|
+
header_params[:'userid'] = opts[:'userid'] if !opts[:'userid'].nil?
|
321
|
+
|
322
|
+
# form parameters
|
323
|
+
form_params = opts[:form_params] || {}
|
324
|
+
|
325
|
+
# http body (model)
|
326
|
+
post_body = opts[:body]
|
327
|
+
|
328
|
+
return_type = opts[:return_type] || 'Object'
|
329
|
+
|
330
|
+
auth_names = opts[:auth_names] || []
|
331
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
332
|
+
:header_params => header_params,
|
333
|
+
:query_params => query_params,
|
334
|
+
:form_params => form_params,
|
335
|
+
:body => post_body,
|
336
|
+
:auth_names => auth_names,
|
337
|
+
:return_type => return_type)
|
338
|
+
|
339
|
+
if @api_client.config.debugging
|
340
|
+
@api_client.config.logger.debug "API called: RecommendApi#recommend_fetch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
341
|
+
end
|
342
|
+
return data, status_code, headers
|
343
|
+
end
|
344
|
+
# 获取已定义的推荐列表
|
345
|
+
# @param app 应用标识
|
346
|
+
# @param [Hash] opts the optional parameters
|
347
|
+
# @return [Array<RecommendBean>]
|
348
|
+
def recommend_list(app, opts = {})
|
349
|
+
data, _status_code, _headers = recommend_list_with_http_info(app, opts)
|
350
|
+
data
|
351
|
+
end
|
352
|
+
|
353
|
+
# 获取已定义的推荐列表
|
354
|
+
# @param app 应用标识
|
355
|
+
# @param [Hash] opts the optional parameters
|
356
|
+
# @return [Array<(Array<RecommendBean>, Integer, Hash)>] Array<RecommendBean> data, response status code and response headers
|
357
|
+
def recommend_list_with_http_info(app, opts = {})
|
358
|
+
if @api_client.config.debugging
|
359
|
+
@api_client.config.logger.debug 'Calling API: RecommendApi.recommend_list ...'
|
360
|
+
end
|
361
|
+
# verify the required parameter 'app' is set
|
362
|
+
if @api_client.config.client_side_validation && app.nil?
|
363
|
+
fail ArgumentError, "Missing the required parameter 'app' when calling RecommendApi.recommend_list"
|
364
|
+
end
|
365
|
+
# resource path
|
366
|
+
local_var_path = '/recommends/{app}'.sub('{' + 'app' + '}', app.to_s)
|
367
|
+
|
368
|
+
# query parameters
|
369
|
+
query_params = opts[:query_params] || {}
|
370
|
+
|
371
|
+
# header parameters
|
372
|
+
header_params = opts[:header_params] || {}
|
373
|
+
# HTTP header 'Accept' (if needed)
|
374
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
375
|
+
|
376
|
+
# form parameters
|
377
|
+
form_params = opts[:form_params] || {}
|
378
|
+
|
379
|
+
# http body (model)
|
380
|
+
post_body = opts[:body]
|
381
|
+
|
382
|
+
return_type = opts[:return_type] || 'Array<RecommendBean>'
|
383
|
+
|
384
|
+
auth_names = opts[:auth_names] || ['TokenAuth']
|
385
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
386
|
+
:header_params => header_params,
|
387
|
+
:query_params => query_params,
|
388
|
+
:form_params => form_params,
|
389
|
+
:body => post_body,
|
390
|
+
:auth_names => auth_names,
|
391
|
+
:return_type => return_type)
|
392
|
+
|
393
|
+
if @api_client.config.debugging
|
394
|
+
@api_client.config.logger.debug "API called: RecommendApi#recommend_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
395
|
+
end
|
396
|
+
return data, status_code, headers
|
397
|
+
end
|
398
|
+
# 更新推荐信息
|
399
|
+
# @param body 推荐信息
|
400
|
+
# @param app 应用标识
|
401
|
+
# @param [Hash] opts the optional parameters
|
402
|
+
# @return [BOOLEAN]
|
403
|
+
def recommend_update(body, app, opts = {})
|
404
|
+
data, _status_code, _headers = recommend_update_with_http_info(body, app, opts)
|
405
|
+
data
|
406
|
+
end
|
407
|
+
|
408
|
+
# 更新推荐信息
|
409
|
+
# @param body 推荐信息
|
410
|
+
# @param app 应用标识
|
411
|
+
# @param [Hash] opts the optional parameters
|
412
|
+
# @return [Array<(BOOLEAN, Integer, Hash)>] BOOLEAN data, response status code and response headers
|
413
|
+
def recommend_update_with_http_info(body, app, opts = {})
|
414
|
+
if @api_client.config.debugging
|
415
|
+
@api_client.config.logger.debug 'Calling API: RecommendApi.recommend_update ...'
|
416
|
+
end
|
417
|
+
# verify the required parameter 'body' is set
|
418
|
+
if @api_client.config.client_side_validation && body.nil?
|
419
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling RecommendApi.recommend_update"
|
420
|
+
end
|
421
|
+
# verify the required parameter 'app' is set
|
422
|
+
if @api_client.config.client_side_validation && app.nil?
|
423
|
+
fail ArgumentError, "Missing the required parameter 'app' when calling RecommendApi.recommend_update"
|
424
|
+
end
|
425
|
+
# resource path
|
426
|
+
local_var_path = '/recommends/{app}'.sub('{' + 'app' + '}', app.to_s)
|
427
|
+
|
428
|
+
# query parameters
|
429
|
+
query_params = opts[:query_params] || {}
|
430
|
+
|
431
|
+
# header parameters
|
432
|
+
header_params = opts[:header_params] || {}
|
433
|
+
# HTTP header 'Accept' (if needed)
|
434
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
435
|
+
# HTTP header 'Content-Type'
|
436
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
437
|
+
|
438
|
+
# form parameters
|
439
|
+
form_params = opts[:form_params] || {}
|
440
|
+
|
441
|
+
# http body (model)
|
442
|
+
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
443
|
+
|
444
|
+
return_type = opts[:return_type] || 'BOOLEAN'
|
445
|
+
|
446
|
+
auth_names = opts[:auth_names] || ['TokenAuth']
|
447
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
448
|
+
:header_params => header_params,
|
449
|
+
:query_params => query_params,
|
450
|
+
:form_params => form_params,
|
451
|
+
:body => post_body,
|
452
|
+
:auth_names => auth_names,
|
453
|
+
:return_type => return_type)
|
454
|
+
|
455
|
+
if @api_client.config.debugging
|
456
|
+
@api_client.config.logger.debug "API called: RecommendApi#recommend_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
457
|
+
end
|
458
|
+
return data, status_code, headers
|
459
|
+
end
|
460
|
+
end
|
461
|
+
end
|