Skip to content

Commit 56e97a8

Browse files
committed
update docstring
1 parent 483466f commit 56e97a8

File tree

1 file changed

+16
-11
lines changed
  • stac_fastapi/core/stac_fastapi/core

1 file changed

+16
-11
lines changed

stac_fastapi/core/stac_fastapi/core/core.py

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -291,23 +291,28 @@ async def item_collection(
291291
token: Optional[str] = None,
292292
**kwargs,
293293
) -> stac_types.ItemCollection:
294-
"""Read items from a specific collection in the database.
294+
"""List items within a specific collection.
295+
296+
This endpoint delegates to ``get_search`` under the hood with
297+
``collections=[collection_id]`` so that filtering, sorting and pagination
298+
behave identically to the Search endpoints.
295299
296300
Args:
297-
collection_id (str): The identifier of the collection to read items from.
298-
bbox (Optional[BBox]): The bounding box to filter items by.
299-
datetime (Optional[str]): The datetime range to filter items by.
300-
sortby (Optional[str]]): Sort spec like "-datetime". Bare fields imply ascending.
301-
token (str): A token used for pagination.
302-
request (Request): The incoming request.
301+
collection_id (str): ID of the collection to list items from.
302+
bbox (Optional[BBox]): Optional bounding box filter.
303+
datetime (Optional[str]): Optional datetime or interval filter.
304+
limit (Optional[int]): Optional page size. Defaults to env ``STAC_ITEM_LIMIT`` when unset.
305+
sortby (Optional[str]): Optional sort specification. Accepts repeated values
306+
like ``sortby=-properties.datetime`` or ``sortby=+id``. Bare fields (e.g. ``sortby=id``)
307+
imply ascending order.
308+
token (Optional[str]): Optional pagination token.
309+
**kwargs: Must include ``request`` (FastAPI Request).
303310
304311
Returns:
305-
ItemCollection: An `ItemCollection` object containing the items from the specified collection that meet
306-
the filter criteria and links to various resources.
312+
ItemCollection: Feature collection with items, paging links, and counts.
307313
308314
Raises:
309-
HTTPException: If the specified collection is not found.
310-
Exception: If any error occurs while reading the items from the database.
315+
HTTPException: 404 if the collection does not exist.
311316
"""
312317
request: Request = kwargs["request"]
313318

0 commit comments

Comments
 (0)