Skip to content

Commit 61a6e71

Browse files
cloudant-sdks-automationeiri
authored andcommitted
fix(generated): correct name to new snippets in examples README
Generated SDK source code using: - Generator version 3.107.1 - Specification version 1.0.0-dev0.1.29 - Automation (cloudant-sdks) version 5284919
1 parent 95df21f commit 61a6e71

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

examples/README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -656,6 +656,25 @@ response = service.post_document(db='products', document=products_doc).get_resul
656656
print(response)
657657
```
658658

659+
### [Example request as a stream](snippets/postDocument/example_request_as_a_stream.py)
660+
661+
[embedmd]:# (snippets/postDocument/example_request_as_a_stream.py)
662+
```py
663+
# section: code
664+
from ibmcloudant.cloudant_v1 import Document, CloudantV1
665+
666+
service = CloudantV1.new_instance()
667+
668+
with open("products_doc.json", "rb") as products_doc:
669+
response = service.post_document(
670+
db='products',
671+
document=products_doc_binary,
672+
content_type="application/json"
673+
).get_result()
674+
675+
print(response)
676+
```
677+
659678
## putDatabase
660679

661680
_PUT `/{db}`_
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# section: code
2+
from ibmcloudant.cloudant_v1 import Document, CloudantV1
3+
4+
service = CloudantV1.new_instance()
5+
6+
with open("products_doc.json", "rb") as products_doc:
7+
response = service.post_document(
8+
db='products',
9+
document=products_doc_binary,
10+
content_type="application/json"
11+
).get_result()
12+
13+
print(response)

0 commit comments

Comments
 (0)