Skip to content

Commit 132acde

Browse files
authored
Merge pull request #80 from deepgram/feature-parity
updated types, update parameters for update projects and create key f…
2 parents 50ac111 + b5defad commit 132acde

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

deepgram/_types.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ class TranscriptionOptions(TypedDict, total=False):
7878
measurements: bool
7979
smart_format: bool
8080
replace: str
81+
tag: List[str]
8182

8283

8384
class PrerecordedOptions(TranscriptionOptions, total=False):
@@ -93,6 +94,7 @@ class PrerecordedOptions(TranscriptionOptions, total=False):
9394
detect_topics: bool
9495
translate: List[str]
9596
analyze_sentiment: bool
97+
sentiment: bool
9698
sentiment_threshold: float
9799

98100

deepgram/keys.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from typing import List
22
from ._types import Options, Key, KeyResponse
33
from ._utils import _request
4-
4+
import datetime
55

66
class Keys:
77
_root = "/projects"
@@ -22,12 +22,12 @@ async def get(self, project_id: str, key: str) -> Key:
2222
)
2323

2424
async def create(
25-
self, project_id: str, comment: str, scopes: List[str]
25+
self, project_id: str, comment: str, scopes: List[str], tags: List[str], expiration_date: datetime, time_to_live_in_seconds: int
2626
) -> Key:
2727
"""Creates an API key with the provided scopes."""
2828
return await _request(
2929
f'{self._root}/{project_id}/keys', self.options,
30-
method='POST', payload={'comment': comment, 'scopes': scopes},
30+
method='POST', payload={'comment': comment, 'scopes': scopes, 'tags': tags, 'expiration_date': expiration_date, 'time_to_live_in_seconds': time_to_live_in_seconds},
3131
headers={'Content-Type': 'application/json'}
3232
)
3333

0 commit comments

Comments
 (0)