Skip to content

Commit 8202654

Browse files
committed
add page_size to cli
1 parent db00079 commit 8202654

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

planet/cli/subscriptions.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,9 @@ def subscriptions(ctx, base_url):
118118
documentation
119119
for examples.""")
120120
@limit
121+
@click.option('--page_size',
122+
type=click.INT,
123+
help='Number of subscriptions to return per page.')
121124
@click.pass_context
122125
@translate_exceptions
123126
@coro
@@ -133,6 +136,7 @@ async def list_subscriptions_cmd(ctx,
133136
sort_by,
134137
updated,
135138
limit,
139+
page_size,
136140
pretty):
137141
"""Prints a sequence of JSON-encoded Subscription descriptions."""
138142
async with subscriptions_client(ctx) as client:
@@ -147,7 +151,8 @@ async def list_subscriptions_cmd(ctx,
147151
status=status,
148152
sort_by=sort_by,
149153
updated=updated,
150-
limit=limit):
154+
limit=limit,
155+
page_size=page_size):
151156
echo_json(sub, pretty)
152157

153158

planet/clients/subscriptions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""Planet Subscriptions API Python client."""
22

33
import logging
4-
from typing import AsyncIterator, Awaitable, Dict, Optional, Sequence, TypeVar, Union
4+
from typing import Any, AsyncIterator, Awaitable, Dict, Optional, Sequence, TypeVar
55

66
from typing_extensions import Literal
77

@@ -136,7 +136,7 @@ class _SubscriptionsPager(Paged):
136136
"""Navigates pages of messages about subscriptions."""
137137
ITEMS_KEY = 'subscriptions'
138138

139-
params: Dict[str, Union[str, Sequence[str], bool, int]] = {}
139+
params: Dict[str, Any] = {}
140140
if created is not None:
141141
params['created'] = created
142142
if end_time is not None:

0 commit comments

Comments
 (0)