Skip to content

Commit 6bb8c4e

Browse files
committed
Adding getUpdates doc
1 parent 5963649 commit 6bb8c4e

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

telegram/bot.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,24 @@ def getUpdates(self,
326326
offset=None,
327327
limit=100,
328328
timeout=0):
329+
"""Use this method to receive incoming updates using long polling.
330+
331+
Args:
332+
offset:
333+
Identifier of the first update to be returned. Must be greater by
334+
one than the highest among the identifiers of previously received
335+
updates. By default, updates starting with the earliest unconfirmed
336+
update are returned. An update is considered confirmed as soon as
337+
getUpdates is called with an offset higher than its update_id.
338+
limit:
339+
Limits the number of updates to be retrieved. Values between 1—100
340+
are accepted. Defaults to 100.
341+
timeout:
342+
Timeout in seconds for long polling. Defaults to 0, i.e. usual
343+
short polling.
344+
Returns:
345+
A list of telegram.Update objects are returned.
346+
"""
329347

330348
url = '%s/getUpdates' % (self.base_url)
331349

0 commit comments

Comments
 (0)