Skip to content

Commit 95df21f

Browse files
cloudant-sdks-automationeiri
authored andcommitted
docs(generated): improve snippet examples
Generated SDK source code using: - Generator version 3.107.1 - Specification version 1.0.0-dev0.1.29 - Automation (cloudant-sdks) version 0a2725e
1 parent c557a31 commit 95df21f

File tree

6 files changed

+8
-12
lines changed

6 files changed

+8
-12
lines changed

examples/README.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,6 @@ service = CloudantV1.new_instance()
249249

250250
response = service.get_db_updates(
251251
feed='normal',
252-
heartbeat=10000,
253252
since='now'
254253
).get_result()
255254

@@ -1001,8 +1000,7 @@ service = CloudantV1.new_instance()
10011000

10021001
response = service.get_design_document(
10031002
db='products',
1004-
ddoc='appliances',
1005-
latest=True
1003+
ddoc='appliances'
10061004
).get_result()
10071005

10081006
print(response)
@@ -1237,7 +1235,7 @@ from ibmcloudant.cloudant_v1 import CloudantV1
12371235
service = CloudantV1.new_instance()
12381236

12391237
response = service.post_design_docs(
1240-
attachments=True,
1238+
descending=True,
12411239
db='users'
12421240
).get_result()
12431241

@@ -1264,7 +1262,7 @@ doc1 = AllDocsQuery(
12641262
)
12651263
doc2 = AllDocsQuery(
12661264
inclusive_end=True,
1267-
key='_design/allusers',
1265+
start_key='_design/allusers',
12681266
skip=1
12691267
)
12701268

@@ -1335,7 +1333,7 @@ service = CloudantV1.new_instance()
13351333

13361334
response = service.post_find(
13371335
db='users',
1338-
selector={'address': {'$regex': 'Street'}},
1336+
selector={'address': {'$exists': True}},
13391337
fields=["_id", "type", "name", "email", "address"],
13401338
limit=3
13411339
).get_result()

examples/snippets/getDbUpdates/example_request.py

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

66
response = service.get_db_updates(
77
feed='normal',
8-
heartbeat=10000,
98
since='now'
109
).get_result()
1110

examples/snippets/getDesignDocument/example_request.py

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

66
response = service.get_design_document(
77
db='products',
8-
ddoc='appliances',
9-
latest=True
8+
ddoc='appliances'
109
).get_result()
1110

1211
print(response)

examples/snippets/postDesignDocs/example_request.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
service = CloudantV1.new_instance()
55

66
response = service.post_design_docs(
7-
attachments=True,
7+
descending=True,
88
db='users'
99
).get_result()
1010

examples/snippets/postDesignDocsQueries/example_request.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
)
1111
doc2 = AllDocsQuery(
1212
inclusive_end=True,
13-
key='_design/allusers',
13+
start_key='_design/allusers',
1414
skip=1
1515
)
1616

examples/snippets/postFind/example_request_for_text_index_type.py

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

66
response = service.post_find(
77
db='users',
8-
selector={'address': {'$regex': 'Street'}},
8+
selector={'address': {'$exists': True}},
99
fields=["_id", "type", "name", "email", "address"],
1010
limit=3
1111
).get_result()

0 commit comments

Comments
 (0)