Skip to content

Commit b4851d4

Browse files
cloudant-sdks-automationmojito317
authored andcommitted
feat(generated): consume openapi definition 1.0.0-dev0.1.6
Generated SDK source code using: - Generator version 3.85.0 - Specification version 1.0.0-dev0.1.6 - Automation (cloudant-sdks) version 649772b Signed-off-by: cloudant-sdks-automation <[email protected]>
1 parent f955eb3 commit b4851d4

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

ibmcloudant/cloudant_v1.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,8 +306,10 @@ def put_capacity_throughput_configuration(
306306
def get_db_updates(
307307
self,
308308
*,
309+
descending: Optional[bool] = None,
309310
feed: Optional[str] = None,
310311
heartbeat: Optional[int] = None,
312+
limit: Optional[int] = None,
311313
timeout: Optional[int] = None,
312314
since: Optional[str] = None,
313315
**kwargs,
@@ -322,6 +324,8 @@ def get_db_updates(
322324
changes. Polling modes for this method work like polling modes for the changes
323325
feed.
324326

327+
:param bool descending: (optional) Query parameter to specify whether to
328+
return the documents in descending by key order.
325329
:param str feed: (optional) Query parameter to specify the changes feed
326330
type.
327331
:param int heartbeat: (optional) Query parameter to specify the period in
@@ -339,6 +343,8 @@ def get_db_updates(
339343
types
340344
(`normal` or `longpoll`).
341345
* Use TCP keepalive.
346+
:param int limit: (optional) Query parameter to specify the number of
347+
returned documents to limit the result to.
342348
:param int timeout: (optional) Query parameter to specify the maximum
343349
period in milliseconds to wait for a change before the response is sent,
344350
even if there are no results. Only applicable for `longpoll` or
@@ -366,8 +372,10 @@ def get_db_updates(
366372
headers.update(sdk_headers)
367373

368374
params = {
375+
'descending': descending,
369376
'feed': feed,
370377
'heartbeat': heartbeat,
378+
'limit': limit,
371379
'timeout': timeout,
372380
'since': since,
373381
}

test/integration/test_cloudant_v1.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,10 @@ def test_put_capacity_throughput_configuration(self):
9999
@needscredentials
100100
def test_get_db_updates(self):
101101
response = self.cloudant_service.get_db_updates(
102+
descending=False,
102103
feed='normal',
103104
heartbeat=0,
105+
limit=0,
104106
timeout=60000,
105107
since='0',
106108
)

test/unit/test_cloudant_v1.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -446,15 +446,19 @@ def test_get_db_updates_all_params(self):
446446
)
447447

448448
# Set up parameter values
449+
descending = False
449450
feed = 'normal'
450451
heartbeat = 0
452+
limit = 0
451453
timeout = 60000
452454
since = '0'
453455

454456
# Invoke method
455457
response = _service.get_db_updates(
458+
descending=descending,
456459
feed=feed,
457460
heartbeat=heartbeat,
461+
limit=limit,
458462
timeout=timeout,
459463
since=since,
460464
headers={},
@@ -466,8 +470,10 @@ def test_get_db_updates_all_params(self):
466470
# Validate query params
467471
query_string = responses.calls[0].request.url.split('?', 1)[1]
468472
query_string = urllib.parse.unquote_plus(query_string)
473+
assert 'descending={}'.format('true' if descending else 'false') in query_string
469474
assert 'feed={}'.format(feed) in query_string
470475
assert 'heartbeat={}'.format(heartbeat) in query_string
476+
assert 'limit={}'.format(limit) in query_string
471477
assert 'timeout={}'.format(timeout) in query_string
472478
assert 'since={}'.format(since) in query_string
473479

0 commit comments

Comments
 (0)