mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2025-12-20 20:29:06 +00:00
Link recorded meeting to a transcript
This commit is contained in:
29
server/reflector/whereby.py
Normal file
29
server/reflector/whereby.py
Normal file
@@ -0,0 +1,29 @@
|
||||
from datetime import datetime
|
||||
|
||||
import httpx
|
||||
from reflector.settings import settings
|
||||
|
||||
|
||||
async def create_meeting(
|
||||
room_name_prefix: str, start_date: datetime, end_date: datetime
|
||||
):
|
||||
headers = {
|
||||
"Content-Type": "application/json; charset=utf-8",
|
||||
"Authorization": f"Bearer {settings.WHEREBY_API_KEY}",
|
||||
}
|
||||
data = {
|
||||
"templateType": "viewerMode",
|
||||
"isLocked": False,
|
||||
"roomNamePrefix": room_name_prefix,
|
||||
"roomNamePattern": "uuid",
|
||||
"roomMode": "normal",
|
||||
"startDate": start_date.isoformat(),
|
||||
"endDate": end_date.isoformat(),
|
||||
}
|
||||
|
||||
async with httpx.AsyncClient() as client:
|
||||
response = await client.post(
|
||||
settings.WHEREBY_API_URL, headers=headers, json=data, timeout=10
|
||||
)
|
||||
response.raise_for_status()
|
||||
return response.json()
|
||||
Reference in New Issue
Block a user