mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-12 02:03:04 +00:00
improve docs
This commit is contained in:
parent
eeb3b63b97
commit
795912bff6
8 changed files with 177 additions and 11 deletions
|
|
@ -1,16 +1,17 @@
|
|||
# Overview
|
||||
|
||||
**aiogram** now is fully support of [Telegram Bot API v4.6](https://core.telegram.org/bots/api)
|
||||
**aiogram** now is fully support of [Telegram Bot API v{!_api_version.md!}](https://core.telegram.org/bots/api)
|
||||
|
||||
All API methods and types is fully autogenerated from Telegram Bot API docs by parser with code-generator.
|
||||
|
||||
Package: `aiogram.api`
|
||||
|
||||
|
||||
## Methods
|
||||
|
||||
All API methods is wrapped as [pydantic](https://pydantic-docs.helpmanual.io/) models and placed in `aiogram.api.methods` package so that's mean all values which you pass as arguments to the methods will be validated.
|
||||
Here is all methods is classes and in due to Python standards all classes named in upper camel case, for example methods `sendMessage` has the name `SendMessage`
|
||||
Also in places where you can send
|
||||
|
||||
Full list of methods can be found in section "[Methods](methods/index.md)"
|
||||
|
||||
## Types
|
||||
|
||||
|
|
@ -21,9 +22,11 @@ In this place makes some more differences with official documentations:
|
|||
- timestamps has `datetime.datetime` type instead of `int`
|
||||
- InputFile is used for sending files and is not use `pydantic.BaseModel` as base class
|
||||
|
||||
Full list of methods can be found in section "[Types](types/index.md)"
|
||||
|
||||
## Bot instance
|
||||
|
||||
Bot instance can be created from `aiogram.Bot` (`#!python3 from aiogram import Bot`)
|
||||
Bot instance can be created from `aiogram.Bot` (`#!python3 from aiogram import Bot`) and you can't use API methods without instance of bot with configured token.
|
||||
|
||||
Constructor specification:
|
||||
|
||||
|
|
@ -32,4 +35,5 @@ Constructor specification:
|
|||
| `token` | `#!python3 str` | Telegram Bot token (Obtained from [@BotFather](https://t.me/BotFather)). |
|
||||
| `session` | `#!python3 Optional[BaseSession]` | HTTP Client session (For example AiohttpSession). If not specified it will be automatically created. |
|
||||
| `parse_mode` | `#!python3 Optional[str]` | Default parse mode. If specified it will be propagated into the API methods at runtime. |
|
||||
|
||||
|
||||
This class has aliases for all API methods and named in `lower_camel_case`. For example `sendMessage` named `send_message` and has the same specification with all class-based methods.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue