Skip to content

Commit 724e326

Browse files
committed
DEVDOCS-10400 add Py Rooms 6 cD mkrs
1 parent f35ad98 commit 724e326

File tree

2 files changed

+19
-10
lines changed

2 files changed

+19
-10
lines changed

app/rooms/examples/eg006_create_external_form_fill_session.py

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ def get_rooms(args):
2727
1. Create an API client with headers
2828
2. Get rooms
2929
"""
30-
# Step 1. Create an API client with headers
30+
# Create an API client with headers
3131
api_client = create_rooms_api_client(access_token=args["access_token"])
3232

33-
# Step 2. Get rooms
33+
# Get rooms
3434
rooms_api = RoomsApi(api_client)
3535
rooms = rooms_api.get_rooms(account_id=args["account_id"])
3636
return rooms.rooms
@@ -41,10 +41,10 @@ def get_room(args):
4141
1. Create an API client with headers
4242
2. Get room by id
4343
"""
44-
# Step 1. Create an API client with headers
44+
# Create an API client with headers
4545
api_client = create_rooms_api_client(access_token=args["access_token"])
4646

47-
# Step 2. Get room by id
47+
# Get room by id
4848
rooms_api = RoomsApi(api_client)
4949
room = rooms_api.get_room(
5050
room_id=args["room_id"],
@@ -59,17 +59,17 @@ def get_forms(args):
5959
2. Get room documents
6060
2. Get room forms
6161
"""
62-
# Step 1. Create an API client with headers
62+
# Create an API client with headers
6363
api_client = create_rooms_api_client(access_token=args["access_token"])
6464

65-
# Step 2. Get room documents
65+
# Get room documents
6666
rooms_api = RoomsApi(api_client)
6767
room_documents = rooms_api.get_documents(
6868
room_id=args["room_id"],
6969
account_id=args["account_id"]
7070
)
7171

72-
# Step 2. Get room forms
72+
# Get room forms
7373
room_forms = [
7474
form for form in room_documents.documents
7575
if form.docu_sign_form_id
@@ -82,19 +82,25 @@ def worker(args):
8282
1. Create an API client with headers
8383
2. Create an external form fill session
8484
"""
85-
# Step 1. Create an API client with headers
85+
# Create an API client with headers
86+
#ds-snippet-start:Rooms6Step2
8687
api_client = create_rooms_api_client(access_token=args["access_token"])
88+
#ds-snippet-end:Rooms6Step2
8789

90+
#ds-snippet-start:Rooms6Step3
8891
request_body = ExternalFormFillSessionForCreate(
8992
room_id=args['room_id'],
9093
form_id=args['form_id'],
9194
x_frame_allowed_url=args['x_frame_allowed_url']
9295
)
96+
#ds-snippet-end:Rooms6Step3
9397

94-
# Step 2. Create an external form fill session
98+
# Create an external form fill session
99+
#ds-snippet-start:Rooms6Step4
95100
form_fill_session_api = ExternalFormFillSessionsApi(api_client)
96101
results = form_fill_session_api.create_external_form_fill_session(
97102
body=request_body,
98103
account_id=args["account_id"]
99104
)
105+
#ds-snippet-end:Rooms6Step4
100106
return results

app/templates/example_rooms_6_done.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,13 @@ <h2>{{ title }}</h2>
66
<p> Results from the ExternalFormFillSessions::CreateExternalFormFillSession: </p>
77
<p><code>{{json}}</code></p>
88

9+
<p style="color:white;">
10+
#ds-snippet-start:Rooms6Step5
911
<iframe width="1000" height="800" src = "{{url}}" >
1012

1113
</iframe>
12-
14+
#ds-snippet-end:Rooms6Step5
15+
</p>
1316

1417
{% if changed_settings %}
1518
<ul>

0 commit comments

Comments
 (0)