You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/communication-services/quickstarts/rooms/includes/rooms-quickstart-net.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -270,4 +270,4 @@ Deleted room with id: 99445276259151407
270
270
271
271
## Reference documentation
272
272
273
-
Read about the full set of capabilities of Azure Communication Services re[.NET SDK reference](/dotnet/api/azure.communication.rooms) or [REST API reference](/rest/api/communication/rooms).
273
+
Read about the full set of capabilities of Azure Communication Services rooms from the[.NET SDK reference](/dotnet/api/azure.communication.rooms) or [REST API reference](/rest/api/communication/rooms).
Copy file name to clipboardExpand all lines: articles/communication-services/quickstarts/rooms/includes/rooms-quickstart-python.md
+94-71Lines changed: 94 additions & 71 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,15 +2,15 @@
2
2
title: include file
3
3
description: include file
4
4
services: azure-communication-services
5
-
author: radubulboaca
6
-
manager: mariusu
5
+
author: peiliu
6
+
manager: alexokun
7
7
8
8
ms.service: azure-communication-services
9
9
ms.subservice: azure-communication-services
10
-
ms.date: 01/26/2022
10
+
ms.date: 04/27/2023
11
11
ms.topic: include
12
12
ms.custom: include file
13
-
ms.author: radubulboaca
13
+
ms.author: peiliu
14
14
---
15
15
16
16
## Prerequisites
@@ -35,7 +35,7 @@ mkdir acs-rooms-quickstart && cd acs-rooms-quickstart
35
35
36
36
### Install the packages
37
37
38
-
You'll need to use the Azure Communication Rooms client library for Python [version 1.0.0b2](https://pypi.org/project/azure-communication-rooms/) or above.
38
+
You'll need to use the Azure Communication Rooms client library for Python [version 1.0.0b3](https://pypi.org/project/azure-communication-rooms/) or above.
39
39
40
40
From a console prompt, navigate to the directory containing the rooms.py file, then execute the following command:
41
41
@@ -55,11 +55,12 @@ from datetime import datetime, timedelta
55
55
from azure.communication.rooms import (
56
56
RoomsClient,
57
57
RoomParticipant,
58
-
RoleType,
59
-
RoomJoinPolicy
58
+
ParticipantRole
59
+
)
60
+
from azure.communication.identity import (
61
+
CommunicationIdentityClient,
62
+
CommunicationUserIdentifier
60
63
)
61
-
from azure.communication.identity import CommunicationUserIdentifier
62
-
63
64
classRoomsQuickstart(object):
64
65
print("Azure Communication Services - Rooms Quickstart")
65
66
#room method implementations goes here
@@ -74,96 +75,126 @@ Create a new `RoomsClient` object that will be used to create new `rooms` and ma
74
75
75
76
```python
76
77
#Find your Communication Services resource in the Azure portal
Create a new `room` with default properties using the code snippet below:
84
+
Create a new `room` with default properties using the code snippet below. When defining participants, if a role is not specified, then it will be set to `Attendee` as default.
print("\nCreated a room with id: "+ create_room_response.id)
102
+
create_room =self.rooms_client.create_room(
103
+
valid_from=valid_from,
104
+
valid_until=valid_until,
105
+
participants=participants
106
+
)
107
+
print("\nCreated a room with id: "+ create_room.id)
101
108
except HttpResponseError as ex:
102
109
print(ex)
103
110
```
104
111
105
-
Since `rooms` are server-side entities, you may want to keep track of and persist the `roomId` in the storage medium of choice. You can reference the `roomId` to view or update the properties of a `room` object.
112
+
Since `rooms` are server-side entities, you may want to keep track of and persist the `room.id` in the storage medium of choice. You can reference the `id` to view or update the properties of a `room` object.
106
113
107
114
## Get properties of an existing room
108
115
109
-
Retrieve the details of an existing `room` by referencing the `roomId`:
116
+
Retrieve the details of an existing `room` by referencing the `id`:
The lifetime of a `room` can be modified by issuing an update request for the `ValidFrom` and `ValidUntil` parameters. A room can be valid for a maximum of six months.
130
+
The lifetime of a `room` can be modified by issuing an update request for the `valid_from` and `valid_until` parameters. A room can be valid for a maximum of six months.
If you wish to disband an existing `room`, you may issue an explicit delete request. All `rooms` and their associated resources are automatically deleted at the end of their validity plus a grace period.
220
+
If you wish to disband an existing `room`, you may issue an explicit delete request. All `rooms` and their associated resources are automatically deleted at the end of their validity plus a grace period.
191
221
192
222
```python
193
-
194
223
# Delete Room
224
+
195
225
self.rooms_client.delete_room(room_id=room)
196
226
print("\nDeleted room with id: "+ room)
197
227
198
228
```
199
229
200
230
## Run the code
201
231
202
-
To run the code, make sure you are on the directory where your `index.js` file is.
232
+
To run the code, make sure you are on the directory where your `rooms-quickstart.py` file is.
203
233
204
234
```console
205
235
206
236
python rooms-quickstart.py
207
237
208
238
```
209
239
210
-
211
240
The expected output describes each completed action:
212
241
213
242
```console
@@ -218,30 +247,24 @@ Created a room with id: 99445276259151407
218
247
219
248
Retrieved room with id: 99445276259151407
220
249
221
-
Updated room with validFrom: 2023-05-11T22:11:46.784Z and validUntil: 2023-05-11T22:16:46.784Z
0 commit comments