From 0f57fc1afa5b918ba7d6e12544eb042e0c240f42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Mitka?= <75326685+lukasz-mitka@users.noreply.github.com> Date: Tue, 13 Sep 2022 17:06:05 +0200 Subject: [PATCH] Increase list packages page size Default is 30 which can be too small. This is a workaround until pagination is available. --- main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index c80a0a3..ae058da 100644 --- a/main.py +++ b/main.py @@ -75,7 +75,7 @@ async def list_org_packages(*, org_name: str, http_client: AsyncClient) -> list[ :param http_client: HTTP client. :return: List of packages. """ - response = await http_client.get(f'{BASE_URL}/orgs/{org_name}/packages?package_type=container') + response = await http_client.get(f'{BASE_URL}/orgs/{org_name}/packages?package_type=container&per_page=100') response.raise_for_status() return [PackageResponse(**i) for i in response.json()] @@ -87,7 +87,7 @@ async def list_packages(*, http_client: AsyncClient) -> list[PackageResponse]: :param http_client: HTTP client. :return: List of packages. """ - response = await http_client.get(f'{BASE_URL}/user/packages?package_type=container') + response = await http_client.get(f'{BASE_URL}/user/packages?package_type=container&per_page=100') response.raise_for_status() return [PackageResponse(**i) for i in response.json()]