1
1
from __future__ import annotations
2
2
3
- from typing import TYPE_CHECKING , Any
3
+ from typing import TYPE_CHECKING , Any , Literal
4
4
5
5
from apify_shared .utils import filter_out_none_values_recursively , ignore_docs
6
6
@@ -26,6 +26,7 @@ def list(
26
26
limit : int | None = None ,
27
27
offset : int | None = None ,
28
28
desc : bool | None = None ,
29
+ sort_by : Literal ['createdAt' , 'lastRunStartedAt' ] | None = 'createdAt' ,
29
30
) -> ListPage [dict ]:
30
31
"""List the Actors the user has created or used.
31
32
@@ -36,11 +37,12 @@ def list(
36
37
limit: How many Actors to list.
37
38
offset: What Actor to include as first when retrieving the list.
38
39
desc: Whether to sort the Actors in descending order based on their creation date.
40
+ sort_by: Field to sort the results by.
39
41
40
42
Returns:
41
43
The list of available Actors matching the specified filters.
42
44
"""
43
- return self ._list (my = my , limit = limit , offset = offset , desc = desc )
45
+ return self ._list (my = my , limit = limit , offset = offset , desc = desc , sortBy = sort_by )
44
46
45
47
def create (
46
48
self ,
@@ -150,6 +152,7 @@ async def list(
150
152
limit : int | None = None ,
151
153
offset : int | None = None ,
152
154
desc : bool | None = None ,
155
+ sort_by : Literal ['createdAt' , 'lastRunStartedAt' ] | None = 'createdAt' ,
153
156
) -> ListPage [dict ]:
154
157
"""List the Actors the user has created or used.
155
158
@@ -160,11 +163,12 @@ async def list(
160
163
limit: How many Actors to list.
161
164
offset: What Actor to include as first when retrieving the list.
162
165
desc: Whether to sort the Actors in descending order based on their creation date.
166
+ sort_by: Field to sort the results by.
163
167
164
168
Returns:
165
169
The list of available Actors matching the specified filters.
166
170
"""
167
- return await self ._list (my = my , limit = limit , offset = offset , desc = desc )
171
+ return await self ._list (my = my , limit = limit , offset = offset , desc = desc , sortBy = sort_by )
168
172
169
173
async def create (
170
174
self ,
0 commit comments