Skip to content

Commit 0878307

Browse files
committed
DEVDOCS-10351 - adding codeDepot markers
1 parent 1229388 commit 0878307

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

app/rooms/examples/eg002_create_room_with_template.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,10 @@ def get_templates(args):
2525
api_client = create_rooms_api_client(access_token=args["access_token"])
2626

2727
# Step 2. Get room templates
28+
#ds-snippet-start:Rooms2Step3
2829
room_templates_api = RoomTemplatesApi(api_client)
2930
templates = room_templates_api.get_room_templates(account_id=args["account_id"])
31+
#ds-snippet-end:Rooms2Step3
3032
return templates.room_templates
3133

3234
@staticmethod
@@ -38,9 +40,12 @@ def worker(args):
3840
4. Post the room using SDK
3941
"""
4042
# Step 1. Create an API client with headers
43+
#ds-snippet-start:Rooms2Step2
4144
api_client = create_rooms_api_client(access_token=args["access_token"])
45+
#ds-snippet-end:Rooms2Step2
4246

4347
# Step 2. Get Default Admin role id
48+
#ds-snippet-start:Rooms2Step4
4449
roles_api = RolesApi(api_client)
4550
roles = roles_api.get_roles(account_id=args["account_id"])
4651
role_id = [role.role_id for role in roles.roles if role.is_default_for_admin][0]
@@ -59,11 +64,14 @@ def worker(args):
5964
}
6065
)
6166
)
67+
#ds-snippet-end:Rooms2Step4
6268

6369
# Step 4. Create the room using a POST API call.
70+
#ds-snippet-start:Rooms2Step5
6471
rooms_api = RoomsApi(api_client)
6572
response = rooms_api.create_room(
6673
body=room,
6774
account_id=args["account_id"],
6875
)
76+
#ds-snippet-end:Rooms2Step5
6977
return response

0 commit comments

Comments
 (0)