From 057a1eed1e7c60391721ebc3aecdc7ce6295b325 Mon Sep 17 00:00:00 2001 From: Gabriel Schowe Date: Wed, 18 Sep 2024 15:52:34 +0200 Subject: [PATCH] Get_All --- pontos/github/api/packages.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/pontos/github/api/packages.py b/pontos/github/api/packages.py index a4fd90e3..58ddb83f 100644 --- a/pontos/github/api/packages.py +++ b/pontos/github/api/packages.py @@ -115,7 +115,7 @@ async def package( async def package_versions( self, organization: str, package_type: PackageType, package_name: str - ) -> AsyncIterator[PackageVersion]: + ): """ Get information about package versions @@ -146,11 +146,8 @@ async def package_versions( print(package) """ api = f"/orgs/{organization}/packages/{package_type}/{package_name}/versions" - async for response in self._client.get_all(api): - response.raise_for_status() - - for version in response.json(): - yield PackageVersion.from_dict(version) + package_versions = self._client.get_all(api) + return package_versions async def package_version( self,