Skip to content

Commit

Permalink
feat(specs): add watch to pushTask ingestion (generated)
Browse files Browse the repository at this point in the history
algolia/api-clients-automation#4224

Co-authored-by: algolia-bot <[email protected]>
Co-authored-by: Clément Vannicatte <[email protected]>
  • Loading branch information
algolia-bot and shortcuts committed Dec 10, 2024
1 parent 412fedf commit 7becbcf
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -922,13 +922,17 @@ public class IngestionClient(
* - editSettings
* @param taskID Unique identifier of a task.
* @param pushTaskPayload Request body of a Search API `batch` request that will be pushed in the Connectors pipeline.
* @param watch When provided, the push operation will be synchronous and the API will wait for the ingestion to be finished before responding.
* @param requestOptions additional request configuration.
*/
public suspend fun pushTask(taskID: String, pushTaskPayload: PushTaskPayload, requestOptions: RequestOptions? = null): RunResponse {
public suspend fun pushTask(taskID: String, pushTaskPayload: PushTaskPayload, watch: Boolean? = null, requestOptions: RequestOptions? = null): RunResponse {
require(taskID.isNotBlank()) { "Parameter `taskID` is required when calling `pushTask`." }
val requestConfig = RequestConfig(
method = RequestMethod.POST,
path = listOf("2", "tasks", "$taskID", "push"),
query = buildMap {
watch?.let { put("watch", it) }
},
body = pushTaskPayload,
)
return requester.execute(
Expand Down

0 comments on commit 7becbcf

Please sign in to comment.