-
Notifications
You must be signed in to change notification settings - Fork 105
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
POST a feature collection to the items route #367
Conversation
needs a changelog entry. |
bulk_client = BulkTransactionsClient(session=self.session) | ||
return_msg = bulk_client.bulk_item_insert(items=model["features"]) | ||
|
||
return return_msg |
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.
this should return None per the signature.
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 about to open another PR that will actually change that signature to be Optional[stac_types.Item], to advertise that None is a valid response
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.
Ok sounds good
@@ -35,11 +35,19 @@ class TransactionsClient(BaseTransactionsClient): | |||
) | |||
|
|||
def create_item( | |||
self, item: stac_types.Item, **kwargs | |||
self, model: Union[stac_types.Item, stac_types.ItemCollection], **kwargs |
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've updated this to reflect the fact that the model is either Item
or ItemCollection
Related Issue(s):
POST collections/{collectionId}/items
should accept an ItemCollection #362Description:
Allow for the items route to accept a feature collection as well as a single item.
PR Checklist:
pre-commit run --all-files
)make test
)make docs
)