From adb495ed463338bb0f688085c572202bab31efbd Mon Sep 17 00:00:00 2001 From: cloudant-sdks-automation <71659186+cloudant-sdks-automation@users.noreply.github.com> Date: Tue, 28 Oct 2025 16:24:53 +0000 Subject: [PATCH] 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 --- examples/README.md | 10 ++++------ examples/snippets/getDbUpdates/example_request.py | 1 - examples/snippets/getDesignDocument/example_request.py | 3 +-- examples/snippets/postDesignDocs/example_request.py | 2 +- .../snippets/postDesignDocsQueries/example_request.py | 2 +- .../postFind/example_request_for_text_index_type.py | 2 +- 6 files changed, 8 insertions(+), 12 deletions(-) diff --git a/examples/README.md b/examples/README.md index 5f80b163..6bb22b35 100644 --- a/examples/README.md +++ b/examples/README.md @@ -249,7 +249,6 @@ service = CloudantV1.new_instance() response = service.get_db_updates( feed='normal', - heartbeat=10000, since='now' ).get_result() @@ -1001,8 +1000,7 @@ service = CloudantV1.new_instance() response = service.get_design_document( db='products', - ddoc='appliances', - latest=True + ddoc='appliances' ).get_result() print(response) @@ -1237,7 +1235,7 @@ from ibmcloudant.cloudant_v1 import CloudantV1 service = CloudantV1.new_instance() response = service.post_design_docs( - attachments=True, + descending=True, db='users' ).get_result() @@ -1264,7 +1262,7 @@ doc1 = AllDocsQuery( ) doc2 = AllDocsQuery( inclusive_end=True, - key='_design/allusers', + start_key='_design/allusers', skip=1 ) @@ -1335,7 +1333,7 @@ service = CloudantV1.new_instance() response = service.post_find( db='users', - selector={'address': {'$regex': 'Street'}}, + selector={'address': {'$exists': True}}, fields=["_id", "type", "name", "email", "address"], limit=3 ).get_result() diff --git a/examples/snippets/getDbUpdates/example_request.py b/examples/snippets/getDbUpdates/example_request.py index 8c99878f..ea8ce344 100644 --- a/examples/snippets/getDbUpdates/example_request.py +++ b/examples/snippets/getDbUpdates/example_request.py @@ -5,7 +5,6 @@ response = service.get_db_updates( feed='normal', - heartbeat=10000, since='now' ).get_result() diff --git a/examples/snippets/getDesignDocument/example_request.py b/examples/snippets/getDesignDocument/example_request.py index 7330e77c..97fd1080 100644 --- a/examples/snippets/getDesignDocument/example_request.py +++ b/examples/snippets/getDesignDocument/example_request.py @@ -5,8 +5,7 @@ response = service.get_design_document( db='products', - ddoc='appliances', - latest=True + ddoc='appliances' ).get_result() print(response) diff --git a/examples/snippets/postDesignDocs/example_request.py b/examples/snippets/postDesignDocs/example_request.py index 92373308..6fe6331c 100644 --- a/examples/snippets/postDesignDocs/example_request.py +++ b/examples/snippets/postDesignDocs/example_request.py @@ -4,7 +4,7 @@ service = CloudantV1.new_instance() response = service.post_design_docs( - attachments=True, + descending=True, db='users' ).get_result() diff --git a/examples/snippets/postDesignDocsQueries/example_request.py b/examples/snippets/postDesignDocsQueries/example_request.py index ce1a089f..c562af36 100644 --- a/examples/snippets/postDesignDocsQueries/example_request.py +++ b/examples/snippets/postDesignDocsQueries/example_request.py @@ -10,7 +10,7 @@ ) doc2 = AllDocsQuery( inclusive_end=True, - key='_design/allusers', + start_key='_design/allusers', skip=1 ) diff --git a/examples/snippets/postFind/example_request_for_text_index_type.py b/examples/snippets/postFind/example_request_for_text_index_type.py index ae8f3583..c704b7de 100644 --- a/examples/snippets/postFind/example_request_for_text_index_type.py +++ b/examples/snippets/postFind/example_request_for_text_index_type.py @@ -5,7 +5,7 @@ response = service.post_find( db='users', - selector={'address': {'$regex': 'Street'}}, + selector={'address': {'$exists': True}}, fields=["_id", "type", "name", "email", "address"], limit=3 ).get_result()