Skip to content

Commit 1c7c41b

Browse files
committed
refactor: rename expires_in_seconds to expires_in_secs
1 parent 0ecbed2 commit 1c7c41b

File tree

4 files changed

+16
-16
lines changed

4 files changed

+16
-16
lines changed

src/apify_client/clients/resource_clients/dataset.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -579,14 +579,14 @@ def create_items_public_url(
579579
skip_hidden: bool | None = None,
580580
flatten: list[str] | None = None,
581581
view: str | None = None,
582-
expires_in_seconds: int | None = None,
582+
expires_in_secs: int | None = None,
583583
) -> str:
584584
"""Generate a URL that can be used to access dataset items.
585585
586586
If the client has permission to access the dataset's URL signing key,
587587
the URL will include a signature to verify its authenticity.
588588
589-
You can optionally control how long the signed URL should be valid using the `expires_in_seconds` option.
589+
You can optionally control how long the signed URL should be valid using the `expires_in_secs` option.
590590
This value sets the expiration duration in seconds from the time the URL is generated.
591591
If not provided, the URL will not expire.
592592
@@ -615,7 +615,7 @@ def create_items_public_url(
615615
signature = create_storage_content_signature(
616616
resource_id=dataset['id'],
617617
url_signing_secret_key=dataset['urlSigningSecretKey'],
618-
expires_in_millis=expires_in_seconds * 1000 if expires_in_seconds is not None else None,
618+
expires_in_millis=expires_in_secs * 1000 if expires_in_secs is not None else None,
619619
)
620620
request_params['signature'] = signature
621621

@@ -1086,14 +1086,14 @@ async def create_items_public_url(
10861086
skip_hidden: bool | None = None,
10871087
flatten: list[str] | None = None,
10881088
view: str | None = None,
1089-
expires_in_seconds: int | None = None,
1089+
expires_in_secs: int | None = None,
10901090
) -> str:
10911091
"""Generate a URL that can be used to access dataset items.
10921092
10931093
If the client has permission to access the dataset's URL signing key,
10941094
the URL will include a signature to verify its authenticity.
10951095
1096-
You can optionally control how long the signed URL should be valid using the `expires_in_seconds` option.
1096+
You can optionally control how long the signed URL should be valid using the `expires_in_secs` option.
10971097
This value sets the expiration duration in seconds from the time the URL is generated.
10981098
If not provided, the URL will not expire.
10991099
@@ -1122,7 +1122,7 @@ async def create_items_public_url(
11221122
signature = create_storage_content_signature(
11231123
resource_id=dataset['id'],
11241124
url_signing_secret_key=dataset['urlSigningSecretKey'],
1125-
expires_in_millis=expires_in_seconds * 1000 if expires_in_seconds is not None else None,
1125+
expires_in_millis=expires_in_secs * 1000 if expires_in_secs is not None else None,
11261126
)
11271127
request_params['signature'] = signature
11281128

src/apify_client/clients/resource_clients/key_value_store.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -274,14 +274,14 @@ def create_keys_public_url(
274274
exclusive_start_key: str | None = None,
275275
collection: str | None = None,
276276
prefix: str | None = None,
277-
expires_in_seconds: int | None = None,
277+
expires_in_secs: int | None = None,
278278
) -> str:
279279
"""Generate a URL that can be used to access key-value store keys.
280280
281281
If the client has permission to access the key-value store's URL signing key,
282282
the URL will include a signature to verify its authenticity.
283283
284-
You can optionally control how long the signed URL should be valid using the `expires_in_seconds` option.
284+
You can optionally control how long the signed URL should be valid using the `expires_in_secs` option.
285285
This value sets the expiration duration in seconds from the time the URL is generated.
286286
If not provided, the URL will not expire.
287287
@@ -303,7 +303,7 @@ def create_keys_public_url(
303303
signature = create_storage_content_signature(
304304
resource_id=store['id'],
305305
url_signing_secret_key=store['urlSigningSecretKey'],
306-
expires_in_millis=expires_in_seconds * 1000 if expires_in_seconds is not None else None,
306+
expires_in_millis=expires_in_secs * 1000 if expires_in_secs is not None else None,
307307
)
308308
request_params['signature'] = signature
309309

@@ -562,14 +562,14 @@ async def create_keys_public_url(
562562
exclusive_start_key: str | None = None,
563563
collection: str | None = None,
564564
prefix: str | None = None,
565-
expires_in_seconds: int | None = None,
565+
expires_in_secs: int | None = None,
566566
) -> str:
567567
"""Generate a URL that can be used to access key-value store keys.
568568
569569
If the client has permission to access the key-value store's URL signing key,
570570
the URL will include a signature to verify its authenticity.
571571
572-
You can optionally control how long the signed URL should be valid using the `expires_in_seconds` option.
572+
You can optionally control how long the signed URL should be valid using the `expires_in_secs` option.
573573
This value sets the expiration duration in seconds from the time the URL is generated.
574574
If not provided, the URL will not expire.
575575
@@ -593,7 +593,7 @@ async def create_keys_public_url(
593593
signature = create_storage_content_signature(
594594
resource_id=store['id'],
595595
url_signing_secret_key=store['urlSigningSecretKey'],
596-
expires_in_millis=expires_in_seconds * 1000 if expires_in_seconds is not None else None,
596+
expires_in_millis=expires_in_secs * 1000 if expires_in_secs is not None else None,
597597
)
598598
request_params['signature'] = signature
599599

tests/integration/test_dataset.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def test_dataset_should_create_public_items_expiring_url_with_params(self, apify
1616

1717
dataset = apify_client.dataset(created_dataset['id'])
1818
items_public_url = dataset.create_items_public_url(
19-
expires_in_seconds=2000,
19+
expires_in_secs=2000,
2020
limit=10,
2121
offset=0,
2222
)
@@ -56,7 +56,7 @@ async def test_dataset_should_create_public_items_expiring_url_with_params(
5656

5757
dataset = apify_client_async.dataset(created_dataset['id'])
5858
items_public_url = await dataset.create_items_public_url(
59-
expires_in_seconds=2000,
59+
expires_in_secs=2000,
6060
limit=10,
6161
offset=0,
6262
)

tests/integration/test_key_value_store.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def test_key_value_store_should_create_expiring_keys_public_url_with_params(
1818

1919
store = apify_client.key_value_store(created_store['id'])
2020
keys_public_url = store.create_keys_public_url(
21-
expires_in_seconds=2000,
21+
expires_in_secs=2000,
2222
limit=10,
2323
)
2424

@@ -58,7 +58,7 @@ async def test_key_value_store_should_create_expiring_keys_public_url_with_param
5858

5959
store = apify_client_async.key_value_store(created_store['id'])
6060
keys_public_url = await store.create_keys_public_url(
61-
expires_in_seconds=2000,
61+
expires_in_secs=2000,
6262
limit=10,
6363
)
6464

0 commit comments

Comments
 (0)