mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Update API
This commit is contained in:
parent
5aeab63384
commit
915c84c742
363 changed files with 1510 additions and 2262 deletions
|
|
@ -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(...))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue