Update API

This commit is contained in:
Alex Root Junior 2021-01-24 20:54:38 +02:00
parent 5aeab63384
commit 915c84c742
363 changed files with 1510 additions and 2262 deletions

View file

@ -2,20 +2,11 @@
getUpdates
##########
Use this method to receive incoming updates using long polling (wiki). An Array of Update objects is returned.
Notes
1. This method will not work if an outgoing webhook is set up.
2. In order to avoid getting duplicate updates, recalculate offset after each server response.
Returns: :obj:`List[Update]`
.. automodule:: aiogram.methods.get_updates
:members:
:member-order: bysource
:special-members: __init__
:undoc-members: True
@ -35,21 +26,20 @@ Method as object
Imports:
- :code:`from aiogram.methods import GetUpdates`
- :code:`from aiogram.methods import GetUpdates`
- :code:`from aiogram.methods.get_updates import GetUpdates`
- alias: :code:`from aiogram.methods import GetUpdates`
In handlers with current bot
----------------------------
.. code-block::
.. code-block:: python
result: List[Update] = await GetUpdates(...)
With specific bot
~~~~~~~~~~~~~~~~~
.. code-block::
.. code-block:: python
result: List[Update] = await bot(GetUpdates(...))