@@ -69,15 +69,15 @@ def __init__(
69
69
min_delay_between_retries_millis : int | None = 500 ,
70
70
timeout_secs : int | None = 360 ,
71
71
) -> None :
72
- """Initialize the Apify API Client .
72
+ """A default constructor .
73
73
74
74
Args:
75
- token (str, optional) : The Apify API token
76
- api_url (str, optional) : The URL of the Apify API server to which to connect to. Defaults to https://api.apify.com
77
- max_retries (int, optional) : How many times to retry a failed request at most
78
- min_delay_between_retries_millis (int, optional) : How long will the client wait between retrying requests
79
- (increases exponentially from this value)
80
- timeout_secs (int, optional) : The socket timeout of the HTTP requests sent to the Apify API
75
+ token: The Apify API token.
76
+ api_url: The URL of the Apify API server to which to connect to. Defaults to https://api.apify.com.
77
+ max_retries: How many times to retry a failed request at most.
78
+ min_delay_between_retries_millis: How long will the client wait between retrying requests
79
+ (increases exponentially from this value).
80
+ timeout_secs: The socket timeout of the HTTP requests sent to the Apify API.
81
81
"""
82
82
self .token = token
83
83
api_url = (api_url or DEFAULT_API_URL ).rstrip ('/' )
@@ -108,15 +108,15 @@ def __init__(
108
108
min_delay_between_retries_millis : int | None = 500 ,
109
109
timeout_secs : int | None = 360 ,
110
110
) -> None :
111
- """Initialize the ApifyClient .
111
+ """A default constructor .
112
112
113
113
Args:
114
- token (str, optional) : The Apify API token
115
- api_url (str, optional) : The URL of the Apify API server to which to connect to. Defaults to https://api.apify.com
116
- max_retries (int, optional) : How many times to retry a failed request at most
117
- min_delay_between_retries_millis (int, optional) : How long will the client wait between retrying requests
118
- (increases exponentially from this value)
119
- timeout_secs (int, optional) : The socket timeout of the HTTP requests sent to the Apify API
114
+ token: The Apify API token.
115
+ api_url: The URL of the Apify API server to which to connect to. Defaults to https://api.apify.com.
116
+ max_retries: How many times to retry a failed request at most.
117
+ min_delay_between_retries_millis: How long will the client wait between retrying requests
118
+ (increases exponentially from this value).
119
+ timeout_secs: The socket timeout of the HTTP requests sent to the Apify API.
120
120
"""
121
121
super ().__init__ (
122
122
token ,
@@ -137,7 +137,7 @@ def actor(self, actor_id: str) -> ActorClient:
137
137
"""Retrieve the sub-client for manipulating a single Actor.
138
138
139
139
Args:
140
- actor_id (str) : ID of the Actor to be manipulated
140
+ actor_id: ID of the Actor to be manipulated.
141
141
"""
142
142
return ActorClient (resource_id = actor_id , ** self ._options ())
143
143
@@ -149,7 +149,7 @@ def build(self, build_id: str) -> BuildClient:
149
149
"""Retrieve the sub-client for manipulating a single Actor build.
150
150
151
151
Args:
152
- build_id (str) : ID of the Actor build to be manipulated
152
+ build_id: ID of the Actor build to be manipulated.
153
153
"""
154
154
return BuildClient (resource_id = build_id , ** self ._options ())
155
155
@@ -161,7 +161,7 @@ def run(self, run_id: str) -> RunClient:
161
161
"""Retrieve the sub-client for manipulating a single Actor run.
162
162
163
163
Args:
164
- run_id (str) : ID of the Actor run to be manipulated
164
+ run_id: ID of the Actor run to be manipulated.
165
165
"""
166
166
return RunClient (resource_id = run_id , ** self ._options ())
167
167
@@ -173,7 +173,7 @@ def dataset(self, dataset_id: str) -> DatasetClient:
173
173
"""Retrieve the sub-client for manipulating a single dataset.
174
174
175
175
Args:
176
- dataset_id (str) : ID of the dataset to be manipulated
176
+ dataset_id: ID of the dataset to be manipulated.
177
177
"""
178
178
return DatasetClient (resource_id = dataset_id , ** self ._options ())
179
179
@@ -185,7 +185,7 @@ def key_value_store(self, key_value_store_id: str) -> KeyValueStoreClient:
185
185
"""Retrieve the sub-client for manipulating a single key-value store.
186
186
187
187
Args:
188
- key_value_store_id (str) : ID of the key-value store to be manipulated
188
+ key_value_store_id: ID of the key-value store to be manipulated.
189
189
"""
190
190
return KeyValueStoreClient (resource_id = key_value_store_id , ** self ._options ())
191
191
@@ -197,8 +197,8 @@ def request_queue(self, request_queue_id: str, *, client_key: str | None = None)
197
197
"""Retrieve the sub-client for manipulating a single request queue.
198
198
199
199
Args:
200
- request_queue_id (str) : ID of the request queue to be manipulated
201
- client_key (str) : A unique identifier of the client accessing the request queue
200
+ request_queue_id: ID of the request queue to be manipulated.
201
+ client_key: A unique identifier of the client accessing the request queue.
202
202
"""
203
203
return RequestQueueClient (resource_id = request_queue_id , client_key = client_key , ** self ._options ())
204
204
@@ -210,7 +210,7 @@ def webhook(self, webhook_id: str) -> WebhookClient:
210
210
"""Retrieve the sub-client for manipulating a single webhook.
211
211
212
212
Args:
213
- webhook_id (str) : ID of the webhook to be manipulated
213
+ webhook_id: ID of the webhook to be manipulated.
214
214
"""
215
215
return WebhookClient (resource_id = webhook_id , ** self ._options ())
216
216
@@ -222,7 +222,7 @@ def webhook_dispatch(self, webhook_dispatch_id: str) -> WebhookDispatchClient:
222
222
"""Retrieve the sub-client for accessing a single webhook dispatch.
223
223
224
224
Args:
225
- webhook_dispatch_id (str) : ID of the webhook dispatch to access
225
+ webhook_dispatch_id: ID of the webhook dispatch to access.
226
226
"""
227
227
return WebhookDispatchClient (resource_id = webhook_dispatch_id , ** self ._options ())
228
228
@@ -234,7 +234,7 @@ def schedule(self, schedule_id: str) -> ScheduleClient:
234
234
"""Retrieve the sub-client for manipulating a single schedule.
235
235
236
236
Args:
237
- schedule_id (str) : ID of the schedule to be manipulated
237
+ schedule_id: ID of the schedule to be manipulated.
238
238
"""
239
239
return ScheduleClient (resource_id = schedule_id , ** self ._options ())
240
240
@@ -246,15 +246,15 @@ def log(self, build_or_run_id: str) -> LogClient:
246
246
"""Retrieve the sub-client for retrieving logs.
247
247
248
248
Args:
249
- build_or_run_id (str) : ID of the Actor build or run for which to access the log
249
+ build_or_run_id: ID of the Actor build or run for which to access the log.
250
250
"""
251
251
return LogClient (resource_id = build_or_run_id , ** self ._options ())
252
252
253
253
def task (self , task_id : str ) -> TaskClient :
254
254
"""Retrieve the sub-client for manipulating a single task.
255
255
256
256
Args:
257
- task_id (str) : ID of the task to be manipulated
257
+ task_id: ID of the task to be manipulated.
258
258
"""
259
259
return TaskClient (resource_id = task_id , ** self ._options ())
260
260
@@ -266,7 +266,7 @@ def user(self, user_id: str | None = None) -> UserClient:
266
266
"""Retrieve the sub-client for querying users.
267
267
268
268
Args:
269
- user_id (str, optional) : ID of user to be queried. If None, queries the user belonging to the token supplied to the client
269
+ user_id: ID of user to be queried. If None, queries the user belonging to the token supplied to the client.
270
270
"""
271
271
return UserClient (resource_id = user_id , ** self ._options ())
272
272
@@ -289,15 +289,15 @@ def __init__(
289
289
min_delay_between_retries_millis : int | None = 500 ,
290
290
timeout_secs : int | None = 360 ,
291
291
) -> None :
292
- """Initialize the ApifyClientAsync .
292
+ """A default constructor .
293
293
294
294
Args:
295
- token (str, optional) : The Apify API token
296
- api_url (str, optional) : The URL of the Apify API server to which to connect to. Defaults to https://api.apify.com
297
- max_retries (int, optional) : How many times to retry a failed request at most
298
- min_delay_between_retries_millis (int, optional) : How long will the client wait between retrying requests
299
- (increases exponentially from this value)
300
- timeout_secs (int, optional) : The socket timeout of the HTTP requests sent to the Apify API
295
+ token: The Apify API token.
296
+ api_url: The URL of the Apify API server to which to connect to. Defaults to https://api.apify.com.
297
+ max_retries: How many times to retry a failed request at most.
298
+ min_delay_between_retries_millis: How long will the client wait between retrying requests
299
+ (increases exponentially from this value).
300
+ timeout_secs: The socket timeout of the HTTP requests sent to the Apify API.
301
301
"""
302
302
super ().__init__ (
303
303
token ,
@@ -318,7 +318,7 @@ def actor(self, actor_id: str) -> ActorClientAsync:
318
318
"""Retrieve the sub-client for manipulating a single Actor.
319
319
320
320
Args:
321
- actor_id (str) : ID of the Actor to be manipulated
321
+ actor_id: ID of the Actor to be manipulated.
322
322
"""
323
323
return ActorClientAsync (resource_id = actor_id , ** self ._options ())
324
324
@@ -330,7 +330,7 @@ def build(self, build_id: str) -> BuildClientAsync:
330
330
"""Retrieve the sub-client for manipulating a single Actor build.
331
331
332
332
Args:
333
- build_id (str) : ID of the Actor build to be manipulated
333
+ build_id: ID of the Actor build to be manipulated.
334
334
"""
335
335
return BuildClientAsync (resource_id = build_id , ** self ._options ())
336
336
@@ -342,7 +342,7 @@ def run(self, run_id: str) -> RunClientAsync:
342
342
"""Retrieve the sub-client for manipulating a single Actor run.
343
343
344
344
Args:
345
- run_id (str) : ID of the Actor run to be manipulated
345
+ run_id: ID of the Actor run to be manipulated.
346
346
"""
347
347
return RunClientAsync (resource_id = run_id , ** self ._options ())
348
348
@@ -354,7 +354,7 @@ def dataset(self, dataset_id: str) -> DatasetClientAsync:
354
354
"""Retrieve the sub-client for manipulating a single dataset.
355
355
356
356
Args:
357
- dataset_id (str) : ID of the dataset to be manipulated
357
+ dataset_id: ID of the dataset to be manipulated.
358
358
"""
359
359
return DatasetClientAsync (resource_id = dataset_id , ** self ._options ())
360
360
@@ -366,7 +366,7 @@ def key_value_store(self, key_value_store_id: str) -> KeyValueStoreClientAsync:
366
366
"""Retrieve the sub-client for manipulating a single key-value store.
367
367
368
368
Args:
369
- key_value_store_id (str) : ID of the key-value store to be manipulated
369
+ key_value_store_id: ID of the key-value store to be manipulated.
370
370
"""
371
371
return KeyValueStoreClientAsync (resource_id = key_value_store_id , ** self ._options ())
372
372
@@ -378,8 +378,8 @@ def request_queue(self, request_queue_id: str, *, client_key: str | None = None)
378
378
"""Retrieve the sub-client for manipulating a single request queue.
379
379
380
380
Args:
381
- request_queue_id (str) : ID of the request queue to be manipulated
382
- client_key (str) : A unique identifier of the client accessing the request queue
381
+ request_queue_id: ID of the request queue to be manipulated.
382
+ client_key: A unique identifier of the client accessing the request queue.
383
383
"""
384
384
return RequestQueueClientAsync (resource_id = request_queue_id , client_key = client_key , ** self ._options ())
385
385
@@ -391,7 +391,7 @@ def webhook(self, webhook_id: str) -> WebhookClientAsync:
391
391
"""Retrieve the sub-client for manipulating a single webhook.
392
392
393
393
Args:
394
- webhook_id (str) : ID of the webhook to be manipulated
394
+ webhook_id: ID of the webhook to be manipulated.
395
395
"""
396
396
return WebhookClientAsync (resource_id = webhook_id , ** self ._options ())
397
397
@@ -403,7 +403,7 @@ def webhook_dispatch(self, webhook_dispatch_id: str) -> WebhookDispatchClientAsy
403
403
"""Retrieve the sub-client for accessing a single webhook dispatch.
404
404
405
405
Args:
406
- webhook_dispatch_id (str) : ID of the webhook dispatch to access
406
+ webhook_dispatch_id: ID of the webhook dispatch to access.
407
407
"""
408
408
return WebhookDispatchClientAsync (resource_id = webhook_dispatch_id , ** self ._options ())
409
409
@@ -415,7 +415,7 @@ def schedule(self, schedule_id: str) -> ScheduleClientAsync:
415
415
"""Retrieve the sub-client for manipulating a single schedule.
416
416
417
417
Args:
418
- schedule_id (str) : ID of the schedule to be manipulated
418
+ schedule_id: ID of the schedule to be manipulated.
419
419
"""
420
420
return ScheduleClientAsync (resource_id = schedule_id , ** self ._options ())
421
421
@@ -427,15 +427,15 @@ def log(self, build_or_run_id: str) -> LogClientAsync:
427
427
"""Retrieve the sub-client for retrieving logs.
428
428
429
429
Args:
430
- build_or_run_id (str) : ID of the Actor build or run for which to access the log
430
+ build_or_run_id: ID of the Actor build or run for which to access the log.
431
431
"""
432
432
return LogClientAsync (resource_id = build_or_run_id , ** self ._options ())
433
433
434
434
def task (self , task_id : str ) -> TaskClientAsync :
435
435
"""Retrieve the sub-client for manipulating a single task.
436
436
437
437
Args:
438
- task_id (str) : ID of the task to be manipulated
438
+ task_id: ID of the task to be manipulated.
439
439
"""
440
440
return TaskClientAsync (resource_id = task_id , ** self ._options ())
441
441
@@ -447,7 +447,7 @@ def user(self, user_id: str | None = None) -> UserClientAsync:
447
447
"""Retrieve the sub-client for querying users.
448
448
449
449
Args:
450
- user_id (str, optional) : ID of user to be queried. If None, queries the user belonging to the token supplied to the client
450
+ user_id: ID of user to be queried. If None, queries the user belonging to the token supplied to the client.
451
451
"""
452
452
return UserClientAsync (resource_id = user_id , ** self ._options ())
453
453
0 commit comments