CollectionsMixin#

class CollectionsMixin#

Bases: object

Mixin for collection related API calls.

Collection is a list of items that can be used to filter the search results.

Methods Summary

add_item_to_collection(project_id, ...)

Add an item to a collection.

create_collection(project_id, name)

Create a new collection for a project.

delete_collection(project_id, collection_id)

Delete a collection by ID.

delete_item_from_collection(project_id, ...)

Delete an item from a collection.

get_collection(project_id, collection_id)

Get a collection by ID.

get_collections(project_id)

Get item collections for a project.

get_collections_containing_items(project_id, ...)

Get collections that contain the given items.

update_collection(project_id, collection_id, ...)

Update a collection by ID.

Methods Documentation

add_item_to_collection(project_id, collection_id, item_id)#

Add an item to a collection. The item_id validity is not checked. If successful, returns an empty dictionary.

Return type

Dict[Any, Any]

create_collection(project_id, name)#

Create a new collection for a project.

delete_collection(project_id, collection_id)#

Delete a collection by ID. If successful, returns an empty dictionary.

Return type

Dict[Any, Any]

delete_item_from_collection(project_id, collection_id, item_id)#

Delete an item from a collection. If successful, returns an empty dictionary.

Return type

Dict[Any, Any]

get_collection(project_id, collection_id)#

Get a collection by ID.

get_collections(project_id)#

Get item collections for a project.

get_collections_containing_items(project_id, item_ids)#

Get collections that contain the given items. Returns a dictionary with item IDs as keys and list of collection IDs as values.

update_collection(project_id, collection_id, name)#

Update a collection by ID.