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,375 @@
|
|
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 RecordsApi
|
14
|
+
attr_accessor :api_client
|
15
|
+
|
16
|
+
def initialize(api_client = ApiClient.default)
|
17
|
+
@api_client = api_client
|
18
|
+
end
|
19
|
+
# 删除记录数据
|
20
|
+
# @param app 应用标识
|
21
|
+
# @param index 索引编号
|
22
|
+
# @param _id 主键字段值
|
23
|
+
# @param [Hash] opts the optional parameters
|
24
|
+
# @return [BOOLEAN]
|
25
|
+
def record_delete(app, index, _id, opts = {})
|
26
|
+
data, _status_code, _headers = record_delete_with_http_info(app, index, _id, opts)
|
27
|
+
data
|
28
|
+
end
|
29
|
+
|
30
|
+
# 删除记录数据
|
31
|
+
# @param app 应用标识
|
32
|
+
# @param index 索引编号
|
33
|
+
# @param _id 主键字段值
|
34
|
+
# @param [Hash] opts the optional parameters
|
35
|
+
# @return [Array<(BOOLEAN, Integer, Hash)>] BOOLEAN data, response status code and response headers
|
36
|
+
def record_delete_with_http_info(app, index, _id, opts = {})
|
37
|
+
if @api_client.config.debugging
|
38
|
+
@api_client.config.logger.debug 'Calling API: RecordsApi.record_delete ...'
|
39
|
+
end
|
40
|
+
# verify the required parameter 'app' is set
|
41
|
+
if @api_client.config.client_side_validation && app.nil?
|
42
|
+
fail ArgumentError, "Missing the required parameter 'app' when calling RecordsApi.record_delete"
|
43
|
+
end
|
44
|
+
# verify the required parameter 'index' is set
|
45
|
+
if @api_client.config.client_side_validation && index.nil?
|
46
|
+
fail ArgumentError, "Missing the required parameter 'index' when calling RecordsApi.record_delete"
|
47
|
+
end
|
48
|
+
# verify the required parameter '_id' is set
|
49
|
+
if @api_client.config.client_side_validation && _id.nil?
|
50
|
+
fail ArgumentError, "Missing the required parameter '_id' when calling RecordsApi.record_delete"
|
51
|
+
end
|
52
|
+
# resource path
|
53
|
+
local_var_path = '/records/{app}/{index}'.sub('{' + 'app' + '}', app.to_s).sub('{' + 'index' + '}', index.to_s)
|
54
|
+
|
55
|
+
# query parameters
|
56
|
+
query_params = opts[:query_params] || {}
|
57
|
+
query_params[:'_id'] = @api_client.build_collection_param(_id, :multi)
|
58
|
+
|
59
|
+
# header parameters
|
60
|
+
header_params = opts[:header_params] || {}
|
61
|
+
# HTTP header 'Accept' (if needed)
|
62
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
63
|
+
|
64
|
+
# form parameters
|
65
|
+
form_params = opts[:form_params] || {}
|
66
|
+
|
67
|
+
# http body (model)
|
68
|
+
post_body = opts[:body]
|
69
|
+
|
70
|
+
return_type = opts[:return_type] || 'BOOLEAN'
|
71
|
+
|
72
|
+
auth_names = opts[:auth_names] || ['TokenAuth']
|
73
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
74
|
+
:header_params => header_params,
|
75
|
+
:query_params => query_params,
|
76
|
+
:form_params => form_params,
|
77
|
+
:body => post_body,
|
78
|
+
:auth_names => auth_names,
|
79
|
+
:return_type => return_type)
|
80
|
+
|
81
|
+
if @api_client.config.debugging
|
82
|
+
@api_client.config.logger.debug "API called: RecordsApi#record_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
83
|
+
end
|
84
|
+
return data, status_code, headers
|
85
|
+
end
|
86
|
+
# 获取单条记录详情
|
87
|
+
# @param app 应用标识
|
88
|
+
# @param index 索引编号
|
89
|
+
# @param _id 记录 _id 值
|
90
|
+
# @param [Hash] opts the optional parameters
|
91
|
+
# @return [Object]
|
92
|
+
def record_get(app, index, _id, opts = {})
|
93
|
+
data, _status_code, _headers = record_get_with_http_info(app, index, _id, opts)
|
94
|
+
data
|
95
|
+
end
|
96
|
+
|
97
|
+
# 获取单条记录详情
|
98
|
+
# @param app 应用标识
|
99
|
+
# @param index 索引编号
|
100
|
+
# @param _id 记录 _id 值
|
101
|
+
# @param [Hash] opts the optional parameters
|
102
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
103
|
+
def record_get_with_http_info(app, index, _id, opts = {})
|
104
|
+
if @api_client.config.debugging
|
105
|
+
@api_client.config.logger.debug 'Calling API: RecordsApi.record_get ...'
|
106
|
+
end
|
107
|
+
# verify the required parameter 'app' is set
|
108
|
+
if @api_client.config.client_side_validation && app.nil?
|
109
|
+
fail ArgumentError, "Missing the required parameter 'app' when calling RecordsApi.record_get"
|
110
|
+
end
|
111
|
+
# verify the required parameter 'index' is set
|
112
|
+
if @api_client.config.client_side_validation && index.nil?
|
113
|
+
fail ArgumentError, "Missing the required parameter 'index' when calling RecordsApi.record_get"
|
114
|
+
end
|
115
|
+
# verify the required parameter '_id' is set
|
116
|
+
if @api_client.config.client_side_validation && _id.nil?
|
117
|
+
fail ArgumentError, "Missing the required parameter '_id' when calling RecordsApi.record_get"
|
118
|
+
end
|
119
|
+
# resource path
|
120
|
+
local_var_path = '/records/{app}/{index}'.sub('{' + 'app' + '}', app.to_s).sub('{' + 'index' + '}', index.to_s)
|
121
|
+
|
122
|
+
# query parameters
|
123
|
+
query_params = opts[:query_params] || {}
|
124
|
+
query_params[:'_id'] = _id
|
125
|
+
|
126
|
+
# header parameters
|
127
|
+
header_params = opts[:header_params] || {}
|
128
|
+
# HTTP header 'Accept' (if needed)
|
129
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
130
|
+
|
131
|
+
# form parameters
|
132
|
+
form_params = opts[:form_params] || {}
|
133
|
+
|
134
|
+
# http body (model)
|
135
|
+
post_body = opts[:body]
|
136
|
+
|
137
|
+
return_type = opts[:return_type] || 'Object'
|
138
|
+
|
139
|
+
auth_names = opts[:auth_names] || ['TokenAuth']
|
140
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
141
|
+
:header_params => header_params,
|
142
|
+
:query_params => query_params,
|
143
|
+
:form_params => form_params,
|
144
|
+
:body => post_body,
|
145
|
+
:auth_names => auth_names,
|
146
|
+
:return_type => return_type)
|
147
|
+
|
148
|
+
if @api_client.config.debugging
|
149
|
+
@api_client.config.logger.debug "API called: RecordsApi#record_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
150
|
+
end
|
151
|
+
return data, status_code, headers
|
152
|
+
end
|
153
|
+
# 获取索引记录列表
|
154
|
+
# @param app 应用标识
|
155
|
+
# @param index 索引编号
|
156
|
+
# @param [Hash] opts the optional parameters
|
157
|
+
# @option opts [RecordFilter] :body
|
158
|
+
# @option opts [String] :q 搜索关键字
|
159
|
+
# @option opts [String] :field 搜索字段
|
160
|
+
# @option opts [Integer] :from 起始记录 (default to 0)
|
161
|
+
# @option opts [Integer] :size 获取记录数 (default to 20)
|
162
|
+
# @option opts [BOOLEAN] :save_filter 是否保存过滤器信息 (default to false)
|
163
|
+
# @return [Array<Object>]
|
164
|
+
def record_list(app, index, opts = {})
|
165
|
+
data, _status_code, _headers = record_list_with_http_info(app, index, opts)
|
166
|
+
data
|
167
|
+
end
|
168
|
+
|
169
|
+
# 获取索引记录列表
|
170
|
+
# @param app 应用标识
|
171
|
+
# @param index 索引编号
|
172
|
+
# @param [Hash] opts the optional parameters
|
173
|
+
# @option opts [RecordFilter] :body
|
174
|
+
# @option opts [String] :q 搜索关键字
|
175
|
+
# @option opts [String] :field 搜索字段
|
176
|
+
# @option opts [Integer] :from 起始记录
|
177
|
+
# @option opts [Integer] :size 获取记录数
|
178
|
+
# @option opts [BOOLEAN] :save_filter 是否保存过滤器信息
|
179
|
+
# @return [Array<(Array<Object>, Integer, Hash)>] Array<Object> data, response status code and response headers
|
180
|
+
def record_list_with_http_info(app, index, opts = {})
|
181
|
+
if @api_client.config.debugging
|
182
|
+
@api_client.config.logger.debug 'Calling API: RecordsApi.record_list ...'
|
183
|
+
end
|
184
|
+
# verify the required parameter 'app' is set
|
185
|
+
if @api_client.config.client_side_validation && app.nil?
|
186
|
+
fail ArgumentError, "Missing the required parameter 'app' when calling RecordsApi.record_list"
|
187
|
+
end
|
188
|
+
# verify the required parameter 'index' is set
|
189
|
+
if @api_client.config.client_side_validation && index.nil?
|
190
|
+
fail ArgumentError, "Missing the required parameter 'index' when calling RecordsApi.record_list"
|
191
|
+
end
|
192
|
+
# resource path
|
193
|
+
local_var_path = '/records/{app}/{index}'.sub('{' + 'app' + '}', app.to_s).sub('{' + 'index' + '}', index.to_s)
|
194
|
+
|
195
|
+
# query parameters
|
196
|
+
query_params = opts[:query_params] || {}
|
197
|
+
query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil?
|
198
|
+
query_params[:'field'] = opts[:'field'] if !opts[:'field'].nil?
|
199
|
+
query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil?
|
200
|
+
query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
|
201
|
+
query_params[:'saveFilter'] = opts[:'save_filter'] if !opts[:'save_filter'].nil?
|
202
|
+
|
203
|
+
# header parameters
|
204
|
+
header_params = opts[:header_params] || {}
|
205
|
+
# HTTP header 'Accept' (if needed)
|
206
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
207
|
+
# HTTP header 'Content-Type'
|
208
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
209
|
+
|
210
|
+
# form parameters
|
211
|
+
form_params = opts[:form_params] || {}
|
212
|
+
|
213
|
+
# http body (model)
|
214
|
+
post_body = opts[:body] || @api_client.object_to_http_body(opts[:'body'])
|
215
|
+
|
216
|
+
return_type = opts[:return_type] || 'Array<Object>'
|
217
|
+
|
218
|
+
auth_names = opts[:auth_names] || ['TokenAuth']
|
219
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
220
|
+
:header_params => header_params,
|
221
|
+
:query_params => query_params,
|
222
|
+
:form_params => form_params,
|
223
|
+
:body => post_body,
|
224
|
+
:auth_names => auth_names,
|
225
|
+
:return_type => return_type)
|
226
|
+
|
227
|
+
if @api_client.config.debugging
|
228
|
+
@api_client.config.logger.debug "API called: RecordsApi#record_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
229
|
+
end
|
230
|
+
return data, status_code, headers
|
231
|
+
end
|
232
|
+
# 插入或者更新索引数据
|
233
|
+
# @param body
|
234
|
+
# @param app 应用标识
|
235
|
+
# @param index 索引编号
|
236
|
+
# @param [Hash] opts the optional parameters
|
237
|
+
# @option opts [BOOLEAN] :combine 更新策略:合并还是替换,combine=true 为合并模式 (default to false)
|
238
|
+
# @return [BOOLEAN]
|
239
|
+
def record_push(body, app, index, opts = {})
|
240
|
+
data, _status_code, _headers = record_push_with_http_info(body, app, index, opts)
|
241
|
+
data
|
242
|
+
end
|
243
|
+
|
244
|
+
# 插入或者更新索引数据
|
245
|
+
# @param body
|
246
|
+
# @param app 应用标识
|
247
|
+
# @param index 索引编号
|
248
|
+
# @param [Hash] opts the optional parameters
|
249
|
+
# @option opts [BOOLEAN] :combine 更新策略:合并还是替换,combine=true 为合并模式
|
250
|
+
# @return [Array<(BOOLEAN, Integer, Hash)>] BOOLEAN data, response status code and response headers
|
251
|
+
def record_push_with_http_info(body, app, index, opts = {})
|
252
|
+
if @api_client.config.debugging
|
253
|
+
@api_client.config.logger.debug 'Calling API: RecordsApi.record_push ...'
|
254
|
+
end
|
255
|
+
# verify the required parameter 'body' is set
|
256
|
+
if @api_client.config.client_side_validation && body.nil?
|
257
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling RecordsApi.record_push"
|
258
|
+
end
|
259
|
+
# verify the required parameter 'app' is set
|
260
|
+
if @api_client.config.client_side_validation && app.nil?
|
261
|
+
fail ArgumentError, "Missing the required parameter 'app' when calling RecordsApi.record_push"
|
262
|
+
end
|
263
|
+
# verify the required parameter 'index' is set
|
264
|
+
if @api_client.config.client_side_validation && index.nil?
|
265
|
+
fail ArgumentError, "Missing the required parameter 'index' when calling RecordsApi.record_push"
|
266
|
+
end
|
267
|
+
# resource path
|
268
|
+
local_var_path = '/records/{app}/{index}'.sub('{' + 'app' + '}', app.to_s).sub('{' + 'index' + '}', index.to_s)
|
269
|
+
|
270
|
+
# query parameters
|
271
|
+
query_params = opts[:query_params] || {}
|
272
|
+
query_params[:'combine'] = opts[:'combine'] if !opts[:'combine'].nil?
|
273
|
+
|
274
|
+
# header parameters
|
275
|
+
header_params = opts[:header_params] || {}
|
276
|
+
# HTTP header 'Accept' (if needed)
|
277
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
278
|
+
# HTTP header 'Content-Type'
|
279
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
280
|
+
|
281
|
+
# form parameters
|
282
|
+
form_params = opts[:form_params] || {}
|
283
|
+
|
284
|
+
# http body (model)
|
285
|
+
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
286
|
+
|
287
|
+
return_type = opts[:return_type] || 'BOOLEAN'
|
288
|
+
|
289
|
+
auth_names = opts[:auth_names] || ['TokenAuth']
|
290
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
291
|
+
:header_params => header_params,
|
292
|
+
:query_params => query_params,
|
293
|
+
:form_params => form_params,
|
294
|
+
:body => post_body,
|
295
|
+
:auth_names => auth_names,
|
296
|
+
:return_type => return_type)
|
297
|
+
|
298
|
+
if @api_client.config.debugging
|
299
|
+
@api_client.config.logger.debug "API called: RecordsApi#record_push\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
300
|
+
end
|
301
|
+
return data, status_code, headers
|
302
|
+
end
|
303
|
+
# 上传记录
|
304
|
+
# @param app 应用标识
|
305
|
+
# @param index 索引编号
|
306
|
+
# @param [Hash] opts the optional parameters
|
307
|
+
# @option opts [Array<String>] :files
|
308
|
+
# @option opts [BOOLEAN] :combine 更新策略:合并还是替换,combine=true 为合并模式 (default to false)
|
309
|
+
# @option opts [BOOLEAN] :use_id_as_id_value 使用数据中的 id 值作为记录 _id, 如果没有 id 字段则自动生成 (default to true)
|
310
|
+
# @return [Object]
|
311
|
+
def record_upload(app, index, opts = {})
|
312
|
+
data, _status_code, _headers = record_upload_with_http_info(app, index, opts)
|
313
|
+
data
|
314
|
+
end
|
315
|
+
|
316
|
+
# 上传记录
|
317
|
+
# @param app 应用标识
|
318
|
+
# @param index 索引编号
|
319
|
+
# @param [Hash] opts the optional parameters
|
320
|
+
# @option opts [Array<String>] :files
|
321
|
+
# @option opts [BOOLEAN] :combine 更新策略:合并还是替换,combine=true 为合并模式
|
322
|
+
# @option opts [BOOLEAN] :use_id_as_id_value 使用数据中的 id 值作为记录 _id, 如果没有 id 字段则自动生成
|
323
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
324
|
+
def record_upload_with_http_info(app, index, opts = {})
|
325
|
+
if @api_client.config.debugging
|
326
|
+
@api_client.config.logger.debug 'Calling API: RecordsApi.record_upload ...'
|
327
|
+
end
|
328
|
+
# verify the required parameter 'app' is set
|
329
|
+
if @api_client.config.client_side_validation && app.nil?
|
330
|
+
fail ArgumentError, "Missing the required parameter 'app' when calling RecordsApi.record_upload"
|
331
|
+
end
|
332
|
+
# verify the required parameter 'index' is set
|
333
|
+
if @api_client.config.client_side_validation && index.nil?
|
334
|
+
fail ArgumentError, "Missing the required parameter 'index' when calling RecordsApi.record_upload"
|
335
|
+
end
|
336
|
+
# resource path
|
337
|
+
local_var_path = '/records/{app}/{index}/upload'.sub('{' + 'app' + '}', app.to_s).sub('{' + 'index' + '}', index.to_s)
|
338
|
+
|
339
|
+
# query parameters
|
340
|
+
query_params = opts[:query_params] || {}
|
341
|
+
query_params[:'combine'] = opts[:'combine'] if !opts[:'combine'].nil?
|
342
|
+
query_params[:'useIdAsIdValue'] = opts[:'use_id_as_id_value'] if !opts[:'use_id_as_id_value'].nil?
|
343
|
+
|
344
|
+
# header parameters
|
345
|
+
header_params = opts[:header_params] || {}
|
346
|
+
# HTTP header 'Accept' (if needed)
|
347
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
348
|
+
# HTTP header 'Content-Type'
|
349
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
350
|
+
|
351
|
+
# form parameters
|
352
|
+
form_params = opts[:form_params] || {}
|
353
|
+
form_params['files'] = @api_client.build_collection_param(opts[:'files'], :multi) if !opts[:'files'].nil?
|
354
|
+
|
355
|
+
# http body (model)
|
356
|
+
post_body = opts[:body]
|
357
|
+
|
358
|
+
return_type = opts[:return_type] || 'Object'
|
359
|
+
|
360
|
+
auth_names = opts[:auth_names] || ['TokenAuth']
|
361
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
362
|
+
:header_params => header_params,
|
363
|
+
:query_params => query_params,
|
364
|
+
:form_params => form_params,
|
365
|
+
:body => post_body,
|
366
|
+
:auth_names => auth_names,
|
367
|
+
:return_type => return_type)
|
368
|
+
|
369
|
+
if @api_client.config.debugging
|
370
|
+
@api_client.config.logger.debug "API called: RecordsApi#record_upload\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
371
|
+
end
|
372
|
+
return data, status_code, headers
|
373
|
+
end
|
374
|
+
end
|
375
|
+
end
|