Method: IndexeaClient::RecordsApi#record_push_with_http_info
- Defined in:
- lib/indexea_client/api/records_api.rb
#record_push_with_http_info(body, app, index, opts = {}) ⇒ Array<(BOOLEAN, Integer, Hash)>
插入或者更新索引数据
251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 |
# File 'lib/indexea_client/api/records_api.rb', line 251 def record_push_with_http_info(body, app, index, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RecordsApi.record_push ...' end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling RecordsApi.record_push" end # verify the required parameter 'app' is set if @api_client.config.client_side_validation && app.nil? fail ArgumentError, "Missing the required parameter 'app' when calling RecordsApi.record_push" end # verify the required parameter 'index' is set if @api_client.config.client_side_validation && index.nil? fail ArgumentError, "Missing the required parameter 'index' when calling RecordsApi.record_push" end # resource path local_var_path = '/records/{app}/{index}'.sub('{' + 'app' + '}', app.to_s).sub('{' + 'index' + '}', index.to_s) # query parameters query_params = opts[:query_params] || {} query_params[:'combine'] = opts[:'combine'] if !opts[:'combine'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(body) return_type = opts[:return_type] || 'BOOLEAN' auth_names = opts[:auth_names] || ['TokenAuth'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: RecordsApi#record_push\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |