Skip to content

Commit 13e4da7

Browse files
committed
feat: add MediaType class
1 parent 51fcb5a commit 13e4da7

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

videodb/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
from typing import Optional
77
from videodb._utils._video import play_stream
8-
from videodb._constants import VIDEO_DB_API
8+
from videodb._constants import VIDEO_DB_API, MediaType
99
from videodb.client import Connection
1010
from videodb.exceptions import (
1111
VideodbError,
@@ -25,6 +25,7 @@
2525
"InvalidRequestError",
2626
"SearchError",
2727
"play_stream",
28+
"MediaType",
2829
]
2930

3031

videodb/_constants.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44
VIDEO_DB_API: str = "https://api.videodb.io"
55

66

7+
class MediaType:
8+
video = "video"
9+
audio = "audio"
10+
11+
712
class SearchType:
813
semantic = "semantic"
914

videodb/audio.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ def __repr__(self) -> str:
2121
)
2222

2323
def delete(self) -> None:
24-
self._connection.delete(f"{ApiPath.AUDIO}/{self.id}")
24+
self._connection.delete(f"{ApiPath.audio}/{self.id}")

0 commit comments

Comments
 (0)