Skip to content

Commit 2464fb5

Browse files
committed
feat: add params to default_build
1 parent aabb3a5 commit 2464fb5

File tree

1 file changed

+24
-4
lines changed
  • src/apify_client/clients/resource_clients

1 file changed

+24
-4
lines changed

src/apify_client/clients/resource_clients/actor.py

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -381,15 +381,23 @@ def runs(self) -> RunCollectionClient:
381381
"""Retrieve a client for the runs of this Actor."""
382382
return RunCollectionClient(**self._sub_resource_init_options(resource_path='runs'))
383383

384-
async def default_build(self) -> dict:
384+
async def default_build(
385+
self,
386+
*,
387+
wait_for_finish: int | None = None,
388+
) -> dict:
385389
"""Retrieve Actor's default build.
386390
387391
https://docs.apify.com/api/v2/act-build-default-get
388392
389393
Returns:
390394
The build object.
391395
"""
392-
response = self.http_client.call(url=self._url('builds/default'), method='GET')
396+
request_params = self._params(
397+
waitForFinish=wait_for_finish,
398+
)
399+
400+
response = self.http_client.call(url=self._url('builds/default'), method='GET', params=request_params)
393401

394402
return parse_date_fields(pluck_data(response.json()))
395403

@@ -730,15 +738,27 @@ def runs(self) -> RunCollectionClientAsync:
730738
"""Retrieve a client for the runs of this Actor."""
731739
return RunCollectionClientAsync(**self._sub_resource_init_options(resource_path='runs'))
732740

733-
async def default_build(self) -> dict:
741+
async def default_build(
742+
self,
743+
*,
744+
wait_for_finish: int | None = None,
745+
) -> dict:
734746
"""Retrieve Actor's default build.
735747
736748
https://docs.apify.com/api/v2/act-build-default-get
737749
738750
Returns:
739751
The build object.
740752
"""
741-
response = await self.http_client.call(url=self._url('builds/default'), method='GET')
753+
request_params = self._params(
754+
waitForFinish=wait_for_finish,
755+
)
756+
757+
response = await self.http_client.call(
758+
url=self._url('builds/default'),
759+
method='GET',
760+
params=request_params,
761+
)
742762

743763
return parse_date_fields(pluck_data(response.json()))
744764

0 commit comments

Comments
 (0)