Skip to content

Commit

Permalink
Extend greatest_component_versions to support filtering by date range
Browse files Browse the repository at this point in the history
  • Loading branch information
TuanAnh17N committed Sep 30, 2024
1 parent 1bcf8a0 commit 0b76f13
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions delivery/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,8 @@ def greatest_component_versions(
greatest_version: str=None,
ocm_repo: ocm.OcmRepository=None,
version_filter: str | None=None,
start_date: datetime.date=None,
end_date: datetime.date=None,
):
params = {
'component_name': component_name,
Expand All @@ -325,6 +327,12 @@ def greatest_component_versions(
if version_filter is not None:
params['version_filter'] = version_filter

if start_date:
params['start_date'] = start_date.isoformat()

if end_date:
params['end_date'] = end_date.isoformat()

res = self.request(
url=self._routes.greatest_component_versions(),
params=params,
Expand Down

0 comments on commit 0b76f13

Please sign in to comment.