-
Notifications
You must be signed in to change notification settings - Fork 97
orders + subscriptions: support user_id query param #1188
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for the user_id
query parameter to both the Orders API and Subscriptions API, allowing organization administrators to filter results by user ID. The parameter accepts either "all" to see all users' data or a specific user ID.
- Added
user_id
parameter to client methods for both Orders and Subscriptions APIs - Updated CLI commands to support the new
--user-id
option - Added comprehensive test coverage for the new functionality
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
planet/clients/orders.py | Added user_id parameter to list_orders method with proper type conversion |
planet/clients/subscriptions.py | Added user_id parameter to list_subscriptions method and cleaned up TODO comment |
planet/sync/orders.py | Added user_id parameter to sync wrapper for list_orders |
planet/sync/subscriptions.py | Added user_id parameter to sync wrapper for list_subscriptions |
planet/cli/orders.py | Added --user-id CLI option for orders list command |
planet/cli/subscriptions.py | Added --user-id CLI option for subscriptions list command |
tests/integration/test_orders_api.py | Added comprehensive tests for user_id filtering in both async and sync clients |
tests/integration/test_orders_cli.py | Added CLI test for user_id parameter |
tests/integration/test_subscriptions_api.py | Added test for user_id filtering in subscriptions API |
tests/integration/test_subscriptions_cli.py | Added CLI test parameters for user_id |
docs/cli/cli-orders.md | Added documentation for --user-id option with examples |
docs/cli/cli-subscriptions.md | Added documentation for --user-id option with examples |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! I think the issue that co-pilot flagged should be addressed (the orders client casts user_id to string, and the subscriptions client does not).
Proposed Changes:
For inclusion in changelog (if applicable):
user_id
query parameterPR Checklist: