Skip to content

Commit 526af71

Browse files
committed
refactor: rename upload_token to client_token in CaptureClient
Rename the CaptureClient parameter from upload_token to client_token for consistency with the generate_client_token() method. This improves API naming consistency and matches user expectations. - Rename __init__ parameter: upload_token -> client_token - Update docstring to reflect new parameter name - Keep "uploadToken" in binary protocol payload (required by recorder)
1 parent 8aaa1e1 commit 526af71

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

videodb/capture.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,15 +159,15 @@ class CaptureClient:
159159

160160
def __init__(
161161
self,
162-
upload_token: str,
162+
client_token: str,
163163
base_url: Optional[str] = None,
164164
):
165165
"""Initialize the capture client.
166166
167-
:param str upload_token: Upload token for the capture session.
167+
:param str client_token: Client token for the capture session.
168168
:param str base_url: VideoDB API endpoint URL.
169169
"""
170-
self.upload_token = upload_token
170+
self.client_token = client_token
171171
self.base_url = base_url or os.environ.get("VIDEO_DB_API", VIDEO_DB_API)
172172
self._session_id: Optional[str] = None
173173
self._proc = None
@@ -381,7 +381,7 @@ async def start_capture_session(
381381

382382
payload = {
383383
"sessionId": capture_session_id,
384-
"uploadToken": self.upload_token,
384+
"uploadToken": self.client_token,
385385
"channels": [ch.to_dict() for ch in channels],
386386
}
387387

0 commit comments

Comments
 (0)