You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/pages/event-handling/webhooks.rst
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,7 +31,7 @@ Webhooks
31
31
32
32
.. note::
33
33
34
-
Движки, ``Route``, конфиги и адаптеры импортируются из корня пакета: ``from maxo.transport.webhook import SingleBotEngine, Route, WebhookConfig, AiohttpAdapter``. ``FastAPIAdapter`` тоже лежит там, но появляется только если установлен ``fastapi`` (``maxo[fastapi]``) - без него корень импортируется как обычно. ``Security`` и ``StaticSecret`` берутся из ``maxo.transport.webhook.security``.
34
+
Движки, ``Route`` и конфиги импортируются из корня пакета: ``from maxo.transport.webhook import SingleBotEngine, Route, WebhookConfig``. Адаптеры лежат каждый в своём модуле - ``maxo.transport.webhook.web.aiohttp`` и ``maxo.transport.webhook.web.fastapi`` (последний требует ``maxo[fastapi]``). ``Security`` и ``StaticSecret`` берутся из ``maxo.transport.webhook.security``.
35
35
36
36
Примеры использования
37
37
---------------------
@@ -53,12 +53,12 @@ Webhooks
53
53
from maxo.enums import TextFormat
54
54
from maxo.routing.utils import collect_used_updates
55
55
from maxo.transport.webhook import (
56
-
AiohttpAdapter,
57
56
Route,
58
57
SingleBotEngine,
59
58
WebhookConfig,
60
59
)
61
60
from maxo.transport.webhook.security import Security, StaticSecret
61
+
from maxo.transport.webhook.web.aiohttp import AiohttpAdapter
62
62
from maxo.types import MessageCreated
63
63
64
64
dp = Dispatcher()
@@ -116,12 +116,12 @@ Webhooks
116
116
from maxo.enums import TextFormat
117
117
from maxo.routing.utils import collect_used_updates
118
118
from maxo.transport.webhook import (
119
-
FastAPIAdapter,
120
119
Route,
121
120
SingleBotEngine,
122
121
WebhookConfig,
123
122
)
124
123
from maxo.transport.webhook.security import Security, StaticSecret
124
+
from maxo.transport.webhook.web.fastapi import FastAPIAdapter
0 commit comments