-
Notifications
You must be signed in to change notification settings - Fork 9
docs: update docstrings and readme pystac-client #84
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
gadomski
left a comment
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.
A couple of quick changes, and then a higher-level comment ... I've pushed a commit to this branch to add it to the mkdocs configuration ... this can be used to tell us if there's more things to fix up in the docstrings.
To run mkdocs:
uv run mkdocs serve
pystapi-client/README.md
Outdated
| ## Currently Supported Endpoints | ||
|
|
||
| These endpoints are fully implemented and available in the current version of PySTAPI Client. | ||
|
|
||
| | Category | Endpoint | Description | | ||
| |----------|----------|-------------| | ||
| | Root | `/` | Root endpoint (for links and conformance) | | ||
| | Root | `/conformance` | Conformance information | | ||
| | Products | `/products` | List all products | | ||
| | Products | `/products/{product_id}` | Get specific product | | ||
| | Orders | `/orders` | List all orders | | ||
| | Orders | `/orders/{order_id}` | Get specific order | | ||
|
|
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.
I'm a little wary about including this table, as we'll have to keep it continually updated. I think I'd prefer to just point to the API docs, which will be generated from the code?
pystapi-client/README.md
Outdated
| Pre-request: The app should be accessible at `http://localhost:8000`. | ||
|
|
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.
Don't need this, since in the examples we're hitting a dummy endpoint.
| Pre-request: The app should be accessible at `http://localhost:8000`. |
pystapi-client/README.md
Outdated
| product = client.get_product(product_id="test-spotlight") | ||
|
|
||
| # List all Opportunities for a Product | ||
| opportunities = client.get_product_opportunities(product_id="test-spotlight") | ||
|
|
||
| # List orders | ||
| orders = client.get_orders() | ||
|
|
||
| # Get specific order | ||
| order = client.get_order(order_id="test-order") |
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.
Nit: let's make the call simpler, to show you don't have to pass by keyword:
| product = client.get_product(product_id="test-spotlight") | |
| # List all Opportunities for a Product | |
| opportunities = client.get_product_opportunities(product_id="test-spotlight") | |
| # List orders | |
| orders = client.get_orders() | |
| # Get specific order | |
| order = client.get_order(order_id="test-order") | |
| product = client.get_product("test-spotlight") | |
| # List all Opportunities for a Product | |
| opportunities = client.get_product_opportunities("test-spotlight") | |
| # List orders | |
| orders = client.get_orders() | |
| # Get specific order | |
| order = client.get_order("test-order") |
What I'm changing
resolves #63
Checklist
uv run pytestuv run pre-commit --all-files