Skip to content

Commit 0ef384b

Browse files
fix(generated): update partitioned database examples (#720)
Generated SDK source code using: - Generator version 3.96.0 - Specification version 1.0.0-dev0.1.18 - Automation (cloudant-sdks) version 30afc34
1 parent ff3ac6e commit 0ef384b

File tree

29 files changed

+183
-140
lines changed

29 files changed

+183
-140
lines changed

examples/README.md

Lines changed: 96 additions & 70 deletions
Large diffs are not rendered by default.

examples/snippets/deleteAttachment/example_request.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55

66
response = service.delete_attachment(
77
db='products',
8-
doc_id='small-appliances:100001',
8+
doc_id='1000042',
99
attachment_name='product_details.txt',
1010
rev='4-1a0d1cd6f40472509e9aac646183736a'
1111
).get_result()
1212

1313
print(response)
1414
# section: markdown
15-
# This example requires the `product_details.txt` attachment in `small-appliances:100001` document to exist. To create the attachment, see [Create or modify an attachment.](#putattachment)
15+
# This example requires the `product_details.txt` attachment in `1000042` document to exist. To create the attachment, see [Create or modify an attachment.](#putattachment)

examples/snippets/deleteDocument/example_request.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
service = CloudantV1.new_instance()
55

66
response = service.delete_document(
7-
db='events',
8-
doc_id='0007241142412418284',
9-
rev='2-9a0d1cd9f40472509e9aac6461837367'
7+
db='orders',
8+
doc_id='order00058',
9+
rev='1-99b02e08da151943c2dcb40090160bb8'
1010
).get_result()
1111

1212
print(response)

examples/snippets/getAttachment/example_request.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55

66
response_attachment = service.get_attachment(
77
db='products',
8-
doc_id='small-appliances:100001',
8+
doc_id='1000042',
99
attachment_name='product_details.txt'
1010
).get_result().content
1111

1212
print(response_attachment)
1313
# section: markdown
14-
# This example requires the `product_details.txt` attachment in `small-appliances:100001` document to exist. To create the attachment, see [Create or modify an attachment.](#putattachment)
14+
# This example requires the `product_details.txt` attachment in `1000042` document to exist. To create the attachment, see [Create or modify an attachment.](#putattachment)

examples/snippets/getDocument/example_request.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
response = service.get_document(
77
db='products',
8-
doc_id='small-appliances:1000042'
8+
doc_id='1000042'
99
).get_result()
1010

1111
print(response)

examples/snippets/getDocumentShardsInfo/example_request.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
response = service.get_document_shards_info(
77
db='products',
8-
doc_id='small-appliances:1000042'
8+
doc_id='1000042'
99
).get_result()
1010

1111
print(response)

examples/snippets/getPartitionInformation/example_request.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
service = CloudantV1.new_instance()
55

66
response = service.get_partition_information(
7-
db='products',
8-
partition_key='small-appliances'
7+
db='events',
8+
partition_key='ns1HJS13AMkK'
99
).get_result()
1010

1111
print(response)

examples/snippets/getSearchInfo/example_request.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
service = CloudantV1.new_instance()
55

66
response = service.get_search_info(
7-
db='products',
8-
ddoc='appliances',
9-
index='findByPrice'
7+
db='events',
8+
ddoc='checkout',
9+
index='findByDate'
1010
).get_result()
1111

1212
print(response)
1313
# section: markdown
14-
# This example requires the `findByPrice` Cloudant Search partitioned index to exist. To create the design document with this index, see [Create or modify a design document.](#putdesigndocument)
14+
# This example requires the `findByDate` Cloudant Search partitioned index to exist. To create the design document with this index, see [Create or modify a design document.](#putdesigndocument)

examples/snippets/headAttachment/example_request.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55

66
response = service.head_attachment(
77
db='products',
8-
doc_id='small-appliances:100001',
8+
doc_id='1000042',
99
attachment_name='product_details.txt'
1010
)
1111
print(response.get_status_code())
1212
print(response.get_headers()['Content-Length'])
1313
print(response.get_headers()['Content-Type'])
1414
# section: markdown
15-
# This example requires the `product_details.txt` attachment in `small-appliances:100001` document to exist. To create the attachment, see [Create or modify an attachment.](#putattachment)
15+
# This example requires the `product_details.txt` attachment in `1000042` document to exist. To create the attachment, see [Create or modify an attachment.](#putattachment)

examples/snippets/headDesignDocument/example_request.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
service = CloudantV1.new_instance()
55

66
response = service.head_design_document(
7-
db='products',
8-
ddoc='appliances'
7+
db='events',
8+
ddoc='checkout'
99
)
1010
print(response.get_status_code())
1111
print(response.get_headers()['ETag'])

0 commit comments

Comments
 (0)