Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove all and latest from API members endpoints #180

Merged
merged 1 commit into from
Sep 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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