Skip to content

Commit dcdb228

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 3d3931b commit dcdb228

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

src/main/scala/algoliasearch/api/IngestionClient.scala

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1199,10 +1199,16 @@ class IngestionClient(
11991199
* Unique identifier of a task.
12001200
* @param pushTaskPayload
12011201
* Request body of a Search API `batch` request that will be pushed in the Connectors pipeline.
1202+
* @param watch
1203+
* When provided, the push operation will be synchronous and the API will wait for the ingestion to be finished
1204+
* before responding.
12021205
*/
1203-
def pushTask(taskID: String, pushTaskPayload: PushTaskPayload, requestOptions: Option[RequestOptions] = None)(implicit
1204-
ec: ExecutionContext
1205-
): Future[RunResponse] = Future {
1206+
def pushTask(
1207+
taskID: String,
1208+
pushTaskPayload: PushTaskPayload,
1209+
watch: Option[Boolean] = None,
1210+
requestOptions: Option[RequestOptions] = None
1211+
)(implicit ec: ExecutionContext): Future[RunResponse] = Future {
12061212
requireNotNull(taskID, "Parameter `taskID` is required when calling `pushTask`.")
12071213
requireNotNull(pushTaskPayload, "Parameter `pushTaskPayload` is required when calling `pushTask`.")
12081214

@@ -1211,6 +1217,7 @@ class IngestionClient(
12111217
.withMethod("POST")
12121218
.withPath(s"/2/tasks/${escape(taskID)}/push")
12131219
.withBody(pushTaskPayload)
1220+
.withQueryParameter("watch", watch)
12141221
.build()
12151222
execute[RunResponse](request, requestOptions)
12161223
}

0 commit comments

Comments
 (0)