mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Add sphinx with converting part of pages
This commit is contained in:
parent
3aa68a93d1
commit
f68960ca87
192 changed files with 6123 additions and 350 deletions
52
docs2/source/api/methods/get_updates.rst
Normal file
52
docs2/source/api/methods/get_updates.rst
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
##########
|
||||
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.api.methods.get_updates
|
||||
:members:
|
||||
|
||||
|
||||
Usage
|
||||
=====
|
||||
|
||||
As bot method
|
||||
-------------
|
||||
|
||||
.. code-block::
|
||||
|
||||
result: List[Update] = await bot.get_updates(...)
|
||||
|
||||
|
||||
Method as object
|
||||
----------------
|
||||
|
||||
Imports:
|
||||
|
||||
- :code:`from aiogram.methods import GetUpdates`
|
||||
- :code:`from aiogram.api.methods import GetUpdates`
|
||||
- :code:`from aiogram.api.methods.get_updates import GetUpdates`
|
||||
|
||||
In handlers with current bot
|
||||
----------------------------
|
||||
|
||||
.. code-block::
|
||||
|
||||
result: List[Update] = await GetUpdates(...)
|
||||
|
||||
With specific bot
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. code-block::
|
||||
|
||||
result: List[Update] = await bot(GetUpdates(...))
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue