Skip to content

Commit 4d0fbd4

Browse files
committed
Added snippet markers
1 parent c1075ad commit 4d0fbd4

14 files changed

+28
-2
lines changed

examples/eg001EmbeddedSigning.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ access_token='{ACCESS_TOKEN}'
1616
# the default picture.
1717
account_id='{ACCOUNT_ID}'
1818

19-
#
19+
# ***DS.snippet.0.start
2020
# Step 1. Create the envelope.
2121
# The signer recipient includes a clientUserId setting
2222
#
@@ -128,6 +128,7 @@ cat $response
128128
echo ""
129129

130130
signing_ceremony_url=`cat $response | grep url | sed 's/.*\"url\": \"//' | sed 's/\".*//'`
131+
# ***DS.snippet.0.end
131132
echo ""
132133
printf "The signing ceremony URL is ${signing_ceremony_url}\n"
133134
printf "It is only valid for a couple of minutes. Attempting to automatically open your browser...\n"

examples/eg002SigningViaEmail.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ access_token='{ACCESS_TOKEN}'
1717
# the default picture.
1818
account_id='{ACCOUNT_ID}'
1919

20+
# ***DS.snippet.0.start
2021
# document 1 (html) has tag **signature_1**
2122
# document 2 (docx) has tag /sn1/
2223
# document 3 (pdf) has tag /sn1/
@@ -123,6 +124,7 @@ cat $response
123124

124125
# pull out the envelopeId
125126
envelope_id=`cat $response | grep envelopeId | sed 's/.*\"envelopeId\": \"//' | sed 's/\",.*//'`
127+
# ***DS.snippet.0.end
126128
# Save the envelope id for use by other scripts
127129
echo ${envelope_id} > ../ENVELOPE_ID
128130

examples/eg003ListEnvelopes.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ echo "Sending the list envelope status request to DocuSign..."
2121
echo "Results:"
2222
echo ""
2323

24+
# ***DS.snippet.0.start
2425
# Calculate the from_date query parameter and use the ISO 8601 format.
2526
# Example:
2627
# from_date=2018-09-30T07:43:12+03:00
@@ -38,6 +39,7 @@ curl --header "Authorization: Bearer ${access_token}" \
3839
--get \
3940
--data-urlencode "from_date=${from_date}" \
4041
--request GET ${base_path}/v2/accounts/${account_id}/envelopes
42+
# ***DS.snippet.0.end
4143

4244
echo ""
4345
echo ""

examples/eg004EnvelopeInfo.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,11 @@ echo "Sending the Envelopes::get request to DocuSign..."
3232
echo "Results:"
3333
echo ""
3434

35+
# ***DS.snippet.0.start
3536
curl --header "Authorization: Bearer ${access_token}" \
3637
--header "Content-Type: application/json" \
3738
--request GET ${base_path}/v2/accounts/${account_id}/envelopes/${envelope_id}
39+
# ***DS.snippet.0.end
3840

3941
echo ""
4042
echo ""

examples/eg005EnvelopeRecipients.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,11 @@ echo "Sending the EnvelopeRecipients::list request to DocuSign..."
3232
echo "Results:"
3333
echo ""
3434

35+
# ***DS.snippet.0.start
3536
curl --header "Authorization: Bearer ${access_token}" \
3637
--header "Content-Type: application/json" \
3738
--request GET ${base_path}/v2/accounts/${account_id}/envelopes/${envelope_id}/recipients
39+
# ***DS.snippet.0.end
3840

3941
echo ""
4042
echo ""

examples/eg006EnvelopeDocs.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,11 @@ echo "Sending the EnvelopeDocuments::list request to DocuSign..."
3232
echo "Results:"
3333
echo ""
3434

35+
# ***DS.snippet.0.start
3536
curl --header "Authorization: Bearer ${access_token}" \
3637
--header "Content-Type: application/json" \
3738
--request GET ${base_path}/v2/accounts/${account_id}/envelopes/${envelope_id}/documents
39+
# ***DS.snippet.0.end
3840

3941
echo ""
4042
echo ""

examples/eg007EnvelopeGetDoc.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,12 @@ echo ""
6969
echo "Sending the EnvelopeDocuments::get request to DocuSign..."
7070
echo ""
7171

72+
# ***DS.snippet.0.start
7273
curl --header "Authorization: Bearer ${access_token}" \
7374
--header "Content-Type: application/json" \
7475
--request GET ${base_path}/v2/accounts/${account_id}/envelopes/${envelope_id}/documents/${doc_choice} \
7576
--output ${output_file}${output_file_extension}
77+
# ***DS.snippet.0.end
7678

7779
echo ""
7880
echo "The document(s) are stored in file ${output_file}${output_file_extension}"

examples/eg008CreateTemplate.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ if [[ $SHELL != *"bash"* ]]; then
1717
fi
1818
base_path="https://demo.docusign.net/restapi"
1919

20+
# ***DS.snippet.0.start
2021
# Step 1. List the account's templates
2122
echo ""
2223
echo "Checking to see if the template already exists in your account..."
@@ -192,6 +193,7 @@ cat $response
192193

193194
# pull out the template id
194195
TEMPLATE_ID=`cat $response | grep templateId | sed 's/.*\"templateId\": \"//' | sed 's/\",.*//'`
196+
# ***DS.snippet.0.end
195197
echo ""
196198
echo "Template '${template_name}' was created! Template ID ${TEMPLATE_ID}."
197199
# Save the template id for use by other scripts

examples/eg009UseTemplate.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ if [ ! -f ../TEMPLATE_ID ]; then
2424
fi
2525
template_id=`cat ../TEMPLATE_ID`
2626

27-
#
27+
# ***DS.snippet.0.start
2828
# Step 1. Create the envelope request.
2929
base_path="https://demo.docusign.net/restapi"
3030
# temp files:
@@ -54,6 +54,7 @@ curl --header "Authorization: Bearer ${access_token}" \
5454
}" \
5555
--request POST ${base_path}/v2/accounts/${account_id}/envelopes \
5656
--output ${response}
57+
# ***DS.snippet.0.end
5758

5859
echo ""
5960
echo "Response:"

examples/eg010SendBinaryDocs.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ if [[ $SHELL != *"bash"* ]]; then
1717
fi
1818
base_path="https://demo.docusign.net/restapi"
1919

20+
# ***DS.snippet.0.start
2021
# document 1 (html) has tag **signature_1**
2122
# document 2 (docx) has tag /sn1/
2223
# document 3 (pdf) has tag /sn1/
@@ -151,6 +152,7 @@ curl --header "Authorization: Bearer ${access_token}" \
151152
--data-binary @${request_data} \
152153
--request POST ${base_path}/v2/accounts/${account_id}/envelopes \
153154
--output $response
155+
# ***DS.snippet.0.end
154156

155157
echo ""
156158
cat $response

0 commit comments

Comments
 (0)