Repository navigation
Conversation
The Features API list-items endpoint supports filtering and sorting, but list_items exposed none of it. Add the documented query parameters to both the async FeaturesClient.list_items and the sync FeaturesAPI.list_items: bbox, datetime, id (with ~ fuzzy matching), hashid, and sort. Only non-None filters are sent, so existing calls are unaffected; pagination is unchanged since the API carries the filters through the next links. Closes planetlabs#1221. Signed-off-by: Mike German <mike@stepsventures.com>
ischneider
force-pushed
the
features-list-items-filters
branch
from
November 23, 2026 19:54
fa06e99 to
f130419
Compare
Member
|
Thanks for your contribution! A few comments:
|
datetime was removed from the Features API spec for the items endpoint. Add view, sent as _view (items, wkb64, basic, refs). Give the sync list_items the same parameter docs as the async client, and check the sent params with one shared assertion for both clients.
Author
|
thanks for the review. pushed c93e8e1:
lint, mypy and the full suite pass locally. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1221.
The Features API
GET /collections/{collectionId}/itemsendpoint supports filtering and sorting, butlist_itemsdidn't expose any of it. This adds the documented query parameters to both the asyncFeaturesClient.list_itemsand the syncFeaturesAPI.list_items:bbox, bounding box[xmin, ymin, xmax, ymax], serialized to the comma-separated form the API expectsid, id match, with a~prefix for substring (fuzzy) matchinghashidsort,"id"or"-id"view, sent as_view:items,wkb64,basicorrefsOnly non-
Nonefilters are sent, so existing calls are unaffected. Pagination is unchanged: the filters go out on the first request and the API carries them through thenextlinks. Both clients carry the same parameter docs.test_list_items_with_filterschecks the full set of sent query params with one shared assertion for the async and sync clients.nox -s lint analyzeis clean and the full test suite passes.