Skip to content

Commit ef77d1f

Browse files
committed
update create item
1 parent 7d87e4f commit ef77d1f

File tree

1 file changed

+15
-1
lines changed
  • stac_fastapi/elasticsearch/stac_fastapi/elasticsearch

1 file changed

+15
-1
lines changed

stac_fastapi/elasticsearch/stac_fastapi/elasticsearch/core.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,21 @@ class TransactionsClient(AsyncBaseTransactionsClient):
391391
async def create_item(
392392
self, collection_id: str, item: stac_types.Item, **kwargs
393393
) -> stac_types.Item:
394-
"""Create item."""
394+
"""Create an item in the collection.
395+
396+
Args:
397+
collection_id (str): The id of the collection to add the item to.
398+
item (stac_types.Item): The item to be added to the collection.
399+
kwargs: Additional keyword arguments.
400+
401+
Returns:
402+
stac_types.Item: The created item.
403+
404+
Raises:
405+
NotFound: If the specified collection is not found in the database.
406+
ConflictError: If the item in the specified collection already exists.
407+
408+
"""
395409
base_url = str(kwargs["request"].base_url)
396410

397411
# If a feature collection is posted

0 commit comments

Comments
 (0)