Skip to content

Commit 00325e3

Browse files
feat(specs): add watch to pushTask ingestion (generated)
algolia/api-clients-automation#4224 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Clément Vannicatte <[email protected]>
1 parent c5bc822 commit 00325e3

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

lib/algolia/api/ingestion_client.rb

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2132,9 +2132,10 @@ def list_transformations(items_per_page = nil, page = nil, sort = nil, order = n
21322132
# - editSettings
21332133
# @param task_id [String] Unique identifier of a task. (required)
21342134
# @param push_task_payload [PushTaskPayload] Request body of a Search API `batch` request that will be pushed in the Connectors pipeline. (required)
2135+
# @param watch [Boolean] When provided, the push operation will be synchronous and the API will wait for the ingestion to be finished before responding.
21352136
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
21362137
# @return [Http::Response] the response
2137-
def push_task_with_http_info(task_id, push_task_payload, request_options = {})
2138+
def push_task_with_http_info(task_id, push_task_payload, watch = nil, request_options = {})
21382139
# verify the required parameter 'task_id' is set
21392140
if @api_client.config.client_side_validation && task_id.nil?
21402141
raise ArgumentError, "Parameter `task_id` is required when calling `push_task`."
@@ -2146,6 +2147,7 @@ def push_task_with_http_info(task_id, push_task_payload, request_options = {})
21462147

21472148
path = "/2/tasks/{taskID}/push".sub("{" + "taskID" + "}", Transport.encode_uri(task_id.to_s))
21482149
query_params = {}
2150+
query_params[:watch] = watch unless watch.nil?
21492151
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
21502152
header_params = {}
21512153
header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
@@ -2171,10 +2173,11 @@ def push_task_with_http_info(task_id, push_task_payload, request_options = {})
21712173
# - editSettings
21722174
# @param task_id [String] Unique identifier of a task. (required)
21732175
# @param push_task_payload [PushTaskPayload] Request body of a Search API `batch` request that will be pushed in the Connectors pipeline. (required)
2176+
# @param watch [Boolean] When provided, the push operation will be synchronous and the API will wait for the ingestion to be finished before responding.
21742177
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
21752178
# @return [RunResponse]
2176-
def push_task(task_id, push_task_payload, request_options = {})
2177-
response = push_task_with_http_info(task_id, push_task_payload, request_options)
2179+
def push_task(task_id, push_task_payload, watch = nil, request_options = {})
2180+
response = push_task_with_http_info(task_id, push_task_payload, watch, request_options)
21782181
@api_client.deserialize(response.body, request_options[:debug_return_type] || "Ingestion::RunResponse")
21792182
end
21802183

0 commit comments

Comments
 (0)