forked from nonebot/nonebot2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
600 additions
and
246 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
--- | ||
contentSidebar: true | ||
sidebarDepth: 0 | ||
--- | ||
|
||
# NoneBot.drivers.aiohttp 模块 | ||
|
||
## AIOHTTP 驱动适配 | ||
|
||
本驱动仅支持客户端连接 | ||
|
||
|
||
## _class_ `Driver` | ||
|
||
基类:[`nonebot.drivers.ForwardDriver`](README.md#nonebot.drivers.ForwardDriver) | ||
|
||
AIOHTTP 驱动框架 | ||
|
||
|
||
### _property_ `type` | ||
|
||
驱动名称: `aiohttp` | ||
|
||
|
||
### _property_ `logger` | ||
|
||
aiohttp driver 使用的 logger | ||
|
||
|
||
### `on_startup(func)` | ||
|
||
|
||
* **说明** | ||
|
||
注册一个启动时执行的函数 | ||
|
||
|
||
|
||
* **参数** | ||
|
||
|
||
* `func: Callable[[], Awaitable[None]]` | ||
|
||
|
||
|
||
### `on_shutdown(func)` | ||
|
||
|
||
* **说明** | ||
|
||
注册一个停止时执行的函数 | ||
|
||
|
||
|
||
* **参数** | ||
|
||
|
||
* `func: Callable[[], Awaitable[None]]` | ||
|
||
|
||
|
||
### `setup_http_polling(setup)` | ||
|
||
|
||
* **说明** | ||
|
||
注册一个 HTTP 轮询连接,如果传入一个函数,则该函数会在每次连接时被调用 | ||
|
||
|
||
|
||
* **参数** | ||
|
||
|
||
* `setup: Union[HTTPPollingSetup, Callable[[], Awaitable[HTTPPollingSetup]]]` | ||
|
||
|
||
|
||
### `setup_websocket(setup)` | ||
|
||
|
||
* **说明** | ||
|
||
注册一个 WebSocket 连接,如果传入一个函数,则该函数会在每次重连时被调用 | ||
|
||
|
||
|
||
* **参数** | ||
|
||
|
||
* `setup: Union[WebSocketSetup, Callable[[], Awaitable[WebSocketSetup]]]` | ||
|
||
|
||
|
||
### `run(*args, **kwargs)` | ||
|
||
启动 aiohttp driver | ||
|
||
|
||
## _class_ `WebSocket` | ||
|
||
基类:[`nonebot.drivers.WebSocket`](README.md#nonebot.drivers.WebSocket) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
\-\-\- | ||
contentSidebar: true | ||
sidebarDepth: 0 | ||
\-\-\- | ||
|
||
NoneBot.drivers.aiohttp 模块 | ||
============================= | ||
|
||
.. automodule:: nonebot.drivers.aiohttp | ||
:members: | ||
:private-members: | ||
:show-inheritance: |
Oops, something went wrong.