Skip to content

Commit

Permalink
Merge pull request #180 from NASA-PDS/i179
Browse files Browse the repository at this point in the history
Remove `all` and `latest` from API members endpoints
  • Loading branch information
nutjob4life authored Sep 5, 2024
2 parents 10b6a99 + 18b944f commit 9cee01b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/pds2/aipgen/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
# --------------

_apiquerylimit = 50 # Pagination in the PDS API
_defaultserver = "https://pds.nasa.gov/api/search/1.0/" # Where to find the PDS API
_defaultserver = "https://pds.nasa.gov/api/search/1/" # Where to find the PDS API
_searchkey = "ops:Harvest_Info.ops:harvest_date_time" # How to sort products


Expand Down Expand Up @@ -168,7 +168,9 @@ def _getproducts(server_url: str, lidvid: str, allcollections=True) -> Iterator[
If ``allcollections`` is True, then return all collections for LID-only references; otherwise
return just the latest collection for LID-only references (has no effect on full LIDVID-references).
"""
url = f"{server_url}/products/{lidvid}/members/{'all' if allcollections else 'latest'}"
# Commenting out `all` vs. `latest` functionality for now since the API does not support it at this time
# url = f"{server_url}/products/{lidvid}/members/{'all' if allcollections else 'latest'}"
url = f"{server_url}/products/{lidvid}/members"
params = {"sort": _searchkey, "limit": _apiquerylimit}
while True:
_logger.debug('Making request to %s with params %r', url, params)
Expand Down

0 comments on commit 9cee01b

Please sign in to comment.