Skip to content

Commit 5f6f736

Browse files
authored
Merge pull request #48 from Bandwidth/EDGE-1027
EDGE-1027 updated the participant & session management section to include the optional subscriptions object
2 parents bc42158 + d454b9a commit 5f6f736

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,10 @@ except APIException as e:
175175
```python
176176
web_rtc_client = bandwidth_client.web_rtc_client.client
177177

178+
participant1 = {'participantId': '456'}
179+
participant2 = {'participantId': '789', 'streamAliases': ['alias1', 'alias2']}
180+
subscriptions = {'sessionId': session_id_arg, 'participants': [participant1, participant2]}
181+
178182
create_session_body = Session()
179183
create_session_body.tag = 'new-session'
180184

@@ -191,7 +195,7 @@ create_participant_body.callback_url = "https://sample.com"
191195
create_participant_response = web_rtc_client.create_participant(account_id, create_participant_body)
192196
participant_id = create_participant_response.body.participant.id
193197

194-
web_rtc_client.add_participant_to_session(account_id, session_id, participant_id)
198+
web_rtc_client.add_participant_to_session(account_id, session_id, participant_id, subscriptions)
195199
```
196200

197201
## Supported Python Versions

0 commit comments

Comments
 (0)