Skip to content

Commit 6b76849

Browse files
authored
Merge pull request video-db#30 from video-db/delete-collection
Add delete collection support
2 parents 873df84 + 13835e9 commit 6b76849

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

videodb/__about__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
""" About information for videodb sdk"""
22

33

4-
__version__ = "0.2.7"
4+
__version__ = "0.2.8"
55
__title__ = "videodb"
66
__author__ = "videodb"
77
__email__ = "contact@videodb.io"

videodb/collection.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,15 @@ def __repr__(self) -> str:
3838
f"description={self.description})"
3939
)
4040

41+
def delete(self) -> None:
42+
"""Delete the collection
43+
44+
:raises InvalidRequestError: If the delete fails
45+
:return: None if the delete is successful
46+
:rtype: None
47+
"""
48+
self._connection.delete(path=f"{ApiPath.collection}/{self.id}")
49+
4150
def get_videos(self) -> List[Video]:
4251
videos_data = self._connection.get(
4352
path=f"{ApiPath.video}",

0 commit comments

Comments
 (0)