Skip to content

Commit 72769ed

Browse files
committed
DEVDOCS-10509 - adding codeDepot markers
1 parent 7b0a54d commit 72769ed

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

app/rooms/examples/eg001_create_room_with_data.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,19 @@ def worker(args):
2323
4. Post the room using SDK
2424
"""
2525
# Step 1. Create an API client with headers
26+
#ds-snippet-start:Rooms1Step2
2627
api_client = create_rooms_api_client(
2728
access_token=args["access_token"]
2829
)
30+
#ds-snippet-end:Rooms1Step2
2931

3032
# Step 2. Get Default Admin role id
3133
roles_api = RolesApi(api_client)
3234
roles = roles_api.get_roles(account_id=args["account_id"])
3335
role_id = [role.role_id for role in roles.roles if role.is_default_for_admin][0]
3436

3537
# Step 3. Create RoomForCreate object
38+
#ds-snippet-start:Rooms1Step3
3639
room = RoomForCreate(
3740
name=args["room_name"],
3841
role_id=role_id,
@@ -49,11 +52,14 @@ def worker(args):
4952
}
5053
)
5154
)
55+
#ds-snippet-end:Rooms1Step3
5256

5357
# Step 4. Post the room using SDK
58+
#ds-snippet-start:Rooms1Step4
5459
rooms_api = RoomsApi(api_client)
5560
response = rooms_api.create_room(
5661
body=room,
5762
account_id=args["account_id"]
5863
)
64+
#ds-snippet-end:Rooms2Step4
5965
return response

0 commit comments

Comments
 (0)