Skip to content
This repository was archived by the owner on Feb 18, 2026. It is now read-only.

Commit f627b9a

Browse files
Merge pull request #18 from DolbyIO/fix
Add the region as option when creating a conference
2 parents bd795d9 + f255680 commit f627b9a

3 files changed

Lines changed: 18 additions & 10 deletions

File tree

client/src/dolbyio_rest_apis/communications/conference.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ async def create_conference(
2525
audio_only: bool=False,
2626
participants: List[Participant]=None,
2727
recording_formats: List[str]=None,
28+
region: str=None,
2829
) -> Conference:
2930
r"""
3031
Creates a conference.
@@ -47,6 +48,12 @@ async def create_conference(
4748
participants: List of the :class:`Participant` object to update the permissions.
4849
recording_formats: If specified, the default RecordingConfiguration is overridden.
4950
Specifies the recording format. Valid values are 'mp3' and 'mp4'.
51+
region: Dolby.io region where you want the conference to be hosted. Can be one of:
52+
- au: Australia
53+
- ca: Canada
54+
- eu: Europe
55+
- in: India
56+
- us: United States
5057
5158
Returns:
5259
A :class:`Conference` object.
@@ -96,7 +103,7 @@ async def create_conference(
96103
async with CommunicationsHttpContext() as http_context:
97104
json_response = await http_context.requests_post(
98105
access_token=access_token,
99-
url=f'{get_comms_url_v2()}/conferences/create',
106+
url=f'{get_comms_url_v2(region)}/conferences/create',
100107
payload=payload
101108
)
102109

client/src/dolbyio_rest_apis/communications/internal/urls.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,20 @@
55
This module contains the URLs to use to call the REST APIs.
66
"""
77

8-
API_URL = 'https://api.dolby.io'
9-
COMMS_URL = 'https://comms.api.dolby.io'
10-
SESSION_URL = 'https://session.voxeet.com/v1'
8+
API_URL = 'api.dolby.io'
9+
COMMS_URL = 'comms.api.dolby.io'
10+
SESSION_URL = 'session.voxeet.com/v1'
1111

1212
def get_api_url() -> str:
13-
return f'{API_URL}/v1'
13+
return f'https://{API_URL}/v1'
1414

1515
def get_monitor_url() -> str:
16-
return f'{COMMS_URL}/v1/monitor'
16+
return f'https://{COMMS_URL}/v1/monitor'
1717

18-
def get_comms_url_v2() -> str:
19-
return f'{COMMS_URL}/v2'
18+
def get_comms_url_v2(region: str = None) -> str:
19+
if region is None:
20+
return f'https://{COMMS_URL}/v2'
21+
return f'https://{region}.{COMMS_URL}/v2'
2022

2123
def get_session_url() -> str:
22-
return SESSION_URL
24+
return f'https://{SESSION_URL}'

client/src/dolbyio_rest_apis/streaming/models/subscribe_token.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ def __init__(self, dictionary: dict):
2828
self.token = get_value_or_default(self, 'token', None)
2929
self.added_on = get_value_or_default(self, 'addedOn', None)
3030
self.expires_on = get_value_or_default(self, 'expiresOn', None)
31-
self.expires_on = get_value_or_default(self, 'expiresOn', None)
3231
self.is_active = get_value_or_default(self, 'isActive', None)
3332
self.streams = []
3433
for stream in self['streams']:

0 commit comments

Comments
 (0)