Skip to content

Commit dfab7e4

Browse files
committed
Add delete collection
1 parent 873df84 commit dfab7e4

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

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)