Skip to content

Commit

Permalink
Get_All
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielschowe committed Sep 18, 2024
1 parent df2eabb commit 057a1ee
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions pontos/github/api/packages.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 057a1ee

Please sign in to comment.