Added full support for Bot API 8.0 (#1606)

* Added full support of Bot API 8.0

* Added tests

* Reformat code

* Added changelog

* Bump API version
This commit is contained in:
Alex Root Junior 2024-11-17 23:18:42 +02:00 committed by GitHub
parent f2916ca03f
commit dfc88fc907
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
169 changed files with 1890 additions and 162 deletions

View file

@ -0,0 +1,57 @@
{
"meta": {},
"group": {
"title": "Stickers",
"anchor": "stickers"
},
"object": {
"anchor": "gift",
"name": "Gift",
"description": "This object represents a gift that can be sent by the bot.",
"html_description": "<p>This object represents a gift that can be sent by the bot.</p>",
"rst_description": "This object represents a gift that can be sent by the bot.",
"annotations": [
{
"type": "String",
"description": "Unique identifier of the gift",
"html_description": "<td>Unique identifier of the gift</td>",
"rst_description": "Unique identifier of the gift\n",
"name": "id",
"required": true
},
{
"type": "Sticker",
"description": "The sticker that represents the gift",
"html_description": "<td>The sticker that represents the gift</td>",
"rst_description": "The sticker that represents the gift\n",
"name": "sticker",
"required": true
},
{
"type": "Integer",
"description": "The number of Telegram Stars that must be paid to send the sticker",
"html_description": "<td>The number of Telegram Stars that must be paid to send the sticker</td>",
"rst_description": "The number of Telegram Stars that must be paid to send the sticker\n",
"name": "star_count",
"required": true
},
{
"type": "Integer",
"description": "The total number of the gifts of this type that can be sent; for limited gifts only",
"html_description": "<td><em>Optional</em>. The total number of the gifts of this type that can be sent; for limited gifts only</td>",
"rst_description": "*Optional*. The total number of the gifts of this type that can be sent; for limited gifts only\n",
"name": "total_count",
"required": false
},
{
"type": "Integer",
"description": "The number of remaining gifts of this type that can be sent; for limited gifts only",
"html_description": "<td><em>Optional</em>. The number of remaining gifts of this type that can be sent; for limited gifts only</td>",
"rst_description": "*Optional*. The number of remaining gifts of this type that can be sent; for limited gifts only\n",
"name": "remaining_count",
"required": false
}
],
"category": "types"
}
}

View file

@ -0,0 +1,25 @@
{
"meta": {},
"group": {
"title": "Stickers",
"anchor": "stickers"
},
"object": {
"anchor": "gifts",
"name": "Gifts",
"description": "This object represent a list of gifts.",
"html_description": "<p>This object represent a list of gifts.</p>",
"rst_description": "This object represent a list of gifts.",
"annotations": [
{
"type": "Array of Gift",
"description": "The list of gifts",
"html_description": "<td>The list of gifts</td>",
"rst_description": "The list of gifts\n",
"name": "gifts",
"required": true
}
],
"category": "types"
}
}

View file

@ -0,0 +1,33 @@
{
"meta": {},
"group": {
"title": "Inline mode",
"anchor": "inline-mode"
},
"object": {
"anchor": "preparedinlinemessage",
"name": "PreparedInlineMessage",
"description": "Describes an inline message to be sent by a user of a Mini App.",
"html_description": "<p>Describes an inline message to be sent by a user of a Mini App.</p>",
"rst_description": "Describes an inline message to be sent by a user of a Mini App.",
"annotations": [
{
"type": "String",
"description": "Unique identifier of the prepared message",
"html_description": "<td>Unique identifier of the prepared message</td>",
"rst_description": "Unique identifier of the prepared message\n",
"name": "id",
"required": true
},
{
"type": "Integer",
"description": "Expiration date of the prepared message, in Unix time. Expired prepared messages can no longer be used",
"html_description": "<td>Expiration date of the prepared message, in Unix time. Expired prepared messages can no longer be used</td>",
"rst_description": "Expiration date of the prepared message, in Unix time. Expired prepared messages can no longer be used\n",
"name": "expiration_date",
"required": true
}
],
"category": "types"
}
}

View file

@ -0,0 +1,11 @@
annotations:
expiration_date:
parsed_type:
type: union
items:
- type: std
name: datetime.datetime
- type: std
name: datetime.timedelta
- type: std
name: int

View file

@ -35,6 +35,30 @@
"name": "invoice_payload",
"required": true
},
{
"type": "Integer",
"description": "Expiration date of the subscription, in Unix time; for recurring payments only",
"html_description": "<td><em>Optional</em>. Expiration date of the subscription, in Unix time; for recurring payments only</td>",
"rst_description": "*Optional*. Expiration date of the subscription, in Unix time; for recurring payments only\n",
"name": "subscription_expiration_date",
"required": false
},
{
"type": "True",
"description": "True, if the payment is a recurring payment for a subscription",
"html_description": "<td><em>Optional</em>. True, if the payment is a recurring payment for a subscription</td>",
"rst_description": "*Optional*. True, if the payment is a recurring payment for a subscription\n",
"name": "is_recurring",
"required": false
},
{
"type": "True",
"description": "True, if the payment is the first payment for a subscription",
"html_description": "<td><em>Optional</em>. True, if the payment is the first payment for a subscription</td>",
"rst_description": "*Optional*. True, if the payment is the first payment for a subscription\n",
"name": "is_first_recurring",
"required": false
},
{
"type": "String",
"description": "Identifier of the shipping option chosen by the user",

View file

@ -35,6 +35,14 @@
"name": "invoice_payload",
"required": false
},
{
"type": "Integer",
"description": "The duration of the paid subscription",
"html_description": "<td><em>Optional</em>. The duration of the paid subscription</td>",
"rst_description": "*Optional*. The duration of the paid subscription\n",
"name": "subscription_period",
"required": false
},
{
"type": "Array of PaidMedia",
"description": "Information about the paid media bought by the user",
@ -50,6 +58,14 @@
"rst_description": "*Optional*. Bot-specified paid media payload\n",
"name": "paid_media_payload",
"required": false
},
{
"type": "String",
"description": "The gift sent to the user by the bot",
"html_description": "<td><em>Optional</em>. The gift sent to the user by the bot</td>",
"rst_description": "*Optional*. The gift sent to the user by the bot\n",
"name": "gift",
"required": false
}
],
"category": "types"