Skip to content

Commit 2ecab71

Browse files
committed
set default page_size to 500
1 parent 7447024 commit 2ecab71

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

planet/clients/subscriptions.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ async def list_subscriptions(
7878
start_time: Optional[str] = None,
7979
sort_by: Optional[str] = None,
8080
updated: Optional[str] = None,
81-
page_size: Optional[int] = None) -> AsyncIterator[dict]:
81+
page_size: int = 500) -> AsyncIterator[dict]:
8282
"""Iterate over list of account subscriptions with optional filtering.
8383
8484
Note:
@@ -113,7 +113,7 @@ async def list_subscriptions(
113113
updated (str): filter by updated time or interval.
114114
limit (int): limit the number of subscriptions in the
115115
results. When set to 0, no maximum is applied.
116-
page_size (int): number of subscriptions to return per page, default 20.
116+
page_size (int): number of subscriptions to return per page.
117117
TODO: user_id
118118
119119
Datetime args (created, end_time, start_time, updated) can either be a
@@ -158,8 +158,8 @@ class _SubscriptionsPager(Paged):
158158
params['sort_by'] = sort_by
159159
if updated is not None:
160160
params['updated'] = updated
161-
if page_size is not None:
162-
params['page_size'] = page_size
161+
162+
params['page_size'] = page_size
163163

164164
try:
165165
response = await self._session.request(method='GET',

planet/sync/subscriptions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def list_subscriptions(self,
4646
start_time: Optional[str] = None,
4747
sort_by: Optional[str] = None,
4848
updated: Optional[str] = None,
49-
page_size: Optional[int] = None) -> Iterator[dict]:
49+
page_size: int = 500) -> Iterator[dict]:
5050
"""Iterate over list of account subscriptions with optional filtering.
5151
5252
Note:
@@ -81,7 +81,7 @@ def list_subscriptions(self,
8181
updated (str): filter by updated time or interval.
8282
limit (int): limit the number of subscriptions in the
8383
results. When set to 0, no maximum is applied.
84-
page_size (int): number of subscriptions to return per page, default 20.
84+
page_size (int): number of subscriptions to return per page.
8585
TODO: user_id
8686
8787
Datetime args (created, end_time, start_time, updated) can either be a

0 commit comments

Comments
 (0)