aiogram/.butcher/methods/getUpdates/entity.json
Alex Root Junior 6795b3de05
Added support for Bot API 7.0 (#1387)
* Added support for Bot API 7.0

* Fixed available tests

* Fixed text decorations

* Bot API 7.0 tests for ForwardMessages

* Bot API 7.0 tests for CopyMessages

* Bot API 7.0 tests for DeleteMessages

* Bot API 7.0 tests for GetUserChatBoosts

* Bot API 7.0 tests for SetMessageReaction

* Fixed custom_emoji attribute name

* Fixed tests

* Test parsing CallbackQuery message (inaccessible and accessible)

* Added changes description

* Bot API 7.0 tests for dispatcher handle update message_reaction

* Bot API 7.0 tests for dispatcher handle update message_reaction_count

* Bot API 7.0 tests for dispatcher handle update chat_boost

* Bot API 7.0 tests for dispatcher handle update removed_chat_boost

* fix tests: update ReactionTypeCustomEmoji custom_emoji -> custom_emoji_id

* micro fix Markdown V2 blockquote

* add tests for Markdown tools

* fix markdown test apply single entity

* add tests coverage for Message.react

* check that all messages and content types are covered for Message.content_type

* sort imports in tests (run `make reformat lint`)

* update Giveaway objects Unix time field to DateTime type

* Update Message.content_type property

* upgrade tests for message content_types and sent_copy

* Update Giveaway type generation config

* Update GiveawayWinners and PassportFile types generation configs

---------

Co-authored-by: Suren Khorenyan <surenkhorenyan@gmail.com>
2023-12-31 01:40:44 +02:00

49 lines
6.3 KiB
JSON

{
"meta": {},
"group": {
"title": "Getting updates",
"anchor": "getting-updates"
},
"object": {
"anchor": "getupdates",
"name": "getUpdates",
"description": "Use this method to receive incoming updates using long polling (wiki). Returns an Array of Update objects.\nNotes\n1. This method will not work if an outgoing webhook is set up.\n2. In order to avoid getting duplicate updates, recalculate offset after each server response.",
"html_description": "<p>Use this method to receive incoming updates using long polling (<a href=\"https://en.wikipedia.org/wiki/Push_technology#Long_polling\">wiki</a>). Returns an Array of <a href=\"#update\">Update</a> objects.</p><blockquote>\n<p><strong>Notes</strong><br/>\n<strong>1.</strong> This method will not work if an outgoing webhook is set up.<br/>\n<strong>2.</strong> In order to avoid getting duplicate updates, recalculate <em>offset</em> after each server response.</p>\n</blockquote>",
"rst_description": "Use this method to receive incoming updates using long polling (`wiki <https://en.wikipedia.org/wiki/Push_technology#Long_polling>`_). Returns an Array of :class:`aiogram.types.update.Update` objects.\n\n **Notes**\n \n **1.** This method will not work if an outgoing webhook is set up.\n \n **2.** In order to avoid getting duplicate updates, recalculate *offset* after each server response.",
"annotations": [
{
"type": "Integer",
"required": false,
"description": "Identifier of the first update to be returned. Must be greater by one than the highest among the identifiers of previously received updates. By default, updates starting with the earliest unconfirmed update are returned. An update is considered confirmed as soon as getUpdates is called with an offset higher than its update_id. The negative offset can be specified to retrieve updates starting from -offset update from the end of the updates queue. All previous updates will be forgotten.",
"html_description": "<td>Identifier of the first update to be returned. Must be greater by one than the highest among the identifiers of previously received updates. By default, updates starting with the earliest unconfirmed update are returned. An update is considered confirmed as soon as <a href=\"#getupdates\">getUpdates</a> is called with an <em>offset</em> higher than its <em>update_id</em>. The negative offset can be specified to retrieve updates starting from <em>-offset</em> update from the end of the updates queue. All previous updates will be forgotten.</td>",
"rst_description": "Identifier of the first update to be returned. Must be greater by one than the highest among the identifiers of previously received updates. By default, updates starting with the earliest unconfirmed update are returned. An update is considered confirmed as soon as :class:`aiogram.methods.get_updates.GetUpdates` is called with an *offset* higher than its *update_id*. The negative offset can be specified to retrieve updates starting from *-offset* update from the end of the updates queue. All previous updates will be forgotten.\n",
"name": "offset"
},
{
"type": "Integer",
"required": false,
"description": "Limits the number of updates to be retrieved. Values between 1-100 are accepted. Defaults to 100.",
"html_description": "<td>Limits the number of updates to be retrieved. Values between 1-100 are accepted. Defaults to 100.</td>",
"rst_description": "Limits the number of updates to be retrieved. Values between 1-100 are accepted. Defaults to 100.\n",
"name": "limit"
},
{
"type": "Integer",
"required": false,
"description": "Timeout in seconds for long polling. Defaults to 0, i.e. usual short polling. Should be positive, short polling should be used for testing purposes only.",
"html_description": "<td>Timeout in seconds for long polling. Defaults to 0, i.e. usual short polling. Should be positive, short polling should be used for testing purposes only.</td>",
"rst_description": "Timeout in seconds for long polling. Defaults to 0, i.e. usual short polling. Should be positive, short polling should be used for testing purposes only.\n",
"name": "timeout"
},
{
"type": "Array of String",
"required": false,
"description": "A JSON-serialized list of the update types you want your bot to receive. For example, specify [\"message\", \"edited_channel_post\", \"callback_query\"] to only receive updates of these types. See Update for a complete list of available update types. Specify an empty list to receive all update types except chat_member, message_reaction, and message_reaction_count (default). If not specified, the previous setting will be used.\n\nPlease note that this parameter doesn't affect updates created before the call to the getUpdates, so unwanted updates may be received for a short period of time.",
"html_description": "<td>A JSON-serialized list of the update types you want your bot to receive. For example, specify <code>[\"message\", \"edited_channel_post\", \"callback_query\"]</code> to only receive updates of these types. See <a href=\"#update\">Update</a> for a complete list of available update types. Specify an empty list to receive all update types except <em>chat_member</em>, <em>message_reaction</em>, and <em>message_reaction_count</em> (default). If not specified, the previous setting will be used.<br/>\n<br/>\nPlease note that this parameter doesn't affect updates created before the call to the getUpdates, so unwanted updates may be received for a short period of time.</td>",
"rst_description": "A JSON-serialized list of the update types you want your bot to receive. For example, specify :code:`[\"message\", \"edited_channel_post\", \"callback_query\"]` to only receive updates of these types. See :class:`aiogram.types.update.Update` for a complete list of available update types. Specify an empty list to receive all update types except *chat_member*, *message_reaction*, and *message_reaction_count* (default). If not specified, the previous setting will be used.\n\n\n\nPlease note that this parameter doesn't affect updates created before the call to the getUpdates, so unwanted updates may be received for a short period of time.\n",
"name": "allowed_updates"
}
],
"category": "methods"
}
}