Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,20 @@ class TransactionExtension(ApiExtension):
PUT /collections/{collection_id}/items
DELETE /collections/{collection_id}/items

https://github.com/radiantearth/stac-api-spec/blob/master/ogcapi-features/extensions/transaction/README.md
https://github.com/stac-api-extensions/transaction
https://github.com/stac-api-extensions/collection-transaction

Attributes:
client: CRUD application logic

"""

client: Union[AsyncBaseTransactionsClient, BaseTransactionsClient] = attr.ib()
settings: ApiSettings = attr.ib()
conformance_classes: List[str] = attr.ib(
factory=lambda: [
"https://api.stacspec.org/v1.0.0-rc.3/ogcapi-features/extensions/transaction",
"https://api.stacspec.org/v1.0.0/ogcapi-features/extensions/transaction",
"https://api.stacspec.org/v1.0.0/collections/extensions/transaction",
]
)
schema_href: Optional[str] = attr.ib(default=None)
Expand Down Expand Up @@ -132,6 +135,11 @@ def register_delete_item(self):
endpoint=create_async_endpoint(self.client.delete_item, ItemUri),
)

def register_patch_item(self):
"""Register patch item endpoint (PATCH
/collections/{collection_id}/items/{item_id})."""
raise NotImplementedError

def register_create_collection(self):
"""Register create collection endpoint (POST /collections)."""
self.router.add_api_route(
Expand Down Expand Up @@ -196,6 +204,10 @@ def register_delete_collection(self):
endpoint=create_async_endpoint(self.client.delete_collection, CollectionUri),
)

def register_patch_collection(self):
"""Register patch collection endpoint (PATCH /collections/{collection_id})."""
raise NotImplementedError

def register(self, app: FastAPI) -> None:
"""Register the extension with a FastAPI application.

Expand Down