mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Describe local servers
This commit is contained in:
parent
1a185928a2
commit
0719b27b6d
4 changed files with 25 additions and 0 deletions
|
|
@ -6,6 +6,8 @@ AiohttpSession represents a wrapper-class around `ClientSession` from `aiohttp <
|
|||
|
||||
Currently `AiohttpSession` is a default session used in `aiogram.Bot`
|
||||
|
||||
.. autoclass:: aiogram.client.session.aiohttp.AiohttpSession
|
||||
|
||||
Usage example
|
||||
=============
|
||||
|
||||
|
|
|
|||
13
docs2/api/session/custom_server.rst
Normal file
13
docs2/api/session/custom_server.rst
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
Use Custom API server
|
||||
=====================
|
||||
|
||||
.. autoclass:: aiogram.client.telegram.TelegramAPIServer
|
||||
:members:
|
||||
|
||||
For example, if you want to use self-hosted API server:
|
||||
|
||||
.. code-block:: python3
|
||||
|
||||
session = AiohttpSession()
|
||||
session.api = TelegramAPIServer.from_base('http://localhost:8082')
|
||||
bot = Bot(..., session=session)
|
||||
|
|
@ -2,6 +2,9 @@
|
|||
Client session
|
||||
##############
|
||||
|
||||
Client sessions is used for interacting with API server.
|
||||
|
||||
.. toctree::
|
||||
custom_server
|
||||
base
|
||||
aiohttp
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue