From ff0f11da7fd605ddd380ed67e4e1019452e42ffc Mon Sep 17 00:00:00 2001 From: Github Build Bot Date: Sat, 2 Apr 2022 11:37:16 +0000 Subject: [PATCH] update api docs --- docs/.vuepress/api.js | 2 +- docs/api/ZM/API/OneBotV11.md | 72 ++++--------------- .../ZM/Command/Module/ModuleListCommand.md | 25 ++++++- .../ZM/Command/Module/ModulePackCommand.md | 25 ++++++- docs/api/ZM/Utils/CoMessage.md | 4 +- docs/api/ZM/Utils/Manager/ModuleManager.md | 5 +- docs/api/ZM/Utils/MessageUtil.md | 4 +- 7 files changed, 69 insertions(+), 68 deletions(-) diff --git a/docs/.vuepress/api.js b/docs/.vuepress/api.js index e566b63d..4f5a7fe2 100644 --- a/docs/.vuepress/api.js +++ b/docs/.vuepress/api.js @@ -1 +1 @@ -module.exports = [{"title":"ZM","collapsable":true,"children":["ZM/ZMServer","ZM/ConsoleApplication","ZM/Framework"]},{"title":"ZM/API","collapsable":true,"children":["ZM/API/CQ","ZM/API/OneBotV11","ZM/API/TuringAPI","ZM/API/GoCqhttpAPIV11"]},{"title":"ZM/Annotation","collapsable":true,"children":["ZM/Annotation/AnnotationParser"]},{"title":"ZM/Annotation/Swoole","collapsable":true,"children":["ZM/Annotation/Swoole/OnSwooleEventBase"]},{"title":"ZM/Command","collapsable":true,"children":["ZM/Command/CheckConfigCommand"]},{"title":"ZM/Command/Generate","collapsable":true,"children":["ZM/Command/Generate/APIDocsGenerateCommand"]},{"title":"ZM/Context","collapsable":true,"children":["ZM/Context/Context"]},{"title":"ZM/DB","collapsable":true,"children":["ZM/DB/Table","ZM/DB/DeleteBody","ZM/DB/UpdateBody","ZM/DB/DB","ZM/DB/SelectBody","ZM/DB/InsertBody"]},{"title":"ZM/Event","collapsable":true,"children":["ZM/Event/EventManager","ZM/Event/EventTracer","ZM/Event/EventDispatcher"]},{"title":"ZM/Event/SwooleEvent","collapsable":true,"children":["ZM/Event/SwooleEvent/OnWorkerStart","ZM/Event/SwooleEvent/OnTask"]},{"title":"ZM/Http","collapsable":true,"children":["ZM/Http/Response"]},{"title":"ZM/Module","collapsable":true,"children":["ZM/Module/ModuleUnpacker","ZM/Module/ModulePacker","ZM/Module/ModuleBase","ZM/Module/QQBot"]},{"title":"ZM/MySQL","collapsable":true,"children":["ZM/MySQL/MySQLStatementWrapper","ZM/MySQL/MySQLQueryBuilder","ZM/MySQL/MySQLWrapper","ZM/MySQL/MySQLPool"]},{"title":"ZM/Store","collapsable":true,"children":["ZM/Store/LightCache","ZM/Store/ZMAtomic","ZM/Store/LightCacheInside"]},{"title":"ZM/Store/Redis","collapsable":true,"children":["ZM/Store/Redis/ZMRedis"]},{"title":"ZM/Utils","collapsable":true,"children":["ZM/Utils/Terminal","ZM/Utils/MessageUtil","ZM/Utils/DataProvider","ZM/Utils/SignalListener","ZM/Utils/ZMUtil","ZM/Utils/HttpUtil","ZM/Utils/CoMessage"]},{"title":"ZM/Utils/Manager","collapsable":true,"children":["ZM/Utils/Manager/CronManager","ZM/Utils/Manager/ModuleManager","ZM/Utils/Manager/WorkerManager"]}] \ No newline at end of file +module.exports = [{"title":"ZM","collapsable":true,"children":["ZM/Framework","ZM/ConsoleApplication","ZM/ZMServer"]},{"title":"ZM/API","collapsable":true,"children":["ZM/API/TuringAPI","ZM/API/GoCqhttpAPIV11","ZM/API/CQ","ZM/API/OneBotV11"]},{"title":"ZM/Annotation","collapsable":true,"children":["ZM/Annotation/AnnotationParser"]},{"title":"ZM/Annotation/Swoole","collapsable":true,"children":["ZM/Annotation/Swoole/OnSwooleEventBase"]},{"title":"ZM/Command","collapsable":true,"children":["ZM/Command/CheckConfigCommand"]},{"title":"ZM/Command/Module","collapsable":true,"children":["ZM/Command/Module/ModuleListCommand","ZM/Command/Module/ModulePackCommand"]},{"title":"ZM/Context","collapsable":true,"children":["ZM/Context/Context"]},{"title":"ZM/DB","collapsable":true,"children":["ZM/DB/InsertBody","ZM/DB/DB","ZM/DB/DeleteBody","ZM/DB/UpdateBody","ZM/DB/Table","ZM/DB/SelectBody"]},{"title":"ZM/Event","collapsable":true,"children":["ZM/Event/EventManager","ZM/Event/EventTracer","ZM/Event/EventDispatcher"]},{"title":"ZM/Event/SwooleEvent","collapsable":true,"children":["ZM/Event/SwooleEvent/OnWorkerStart","ZM/Event/SwooleEvent/OnTask"]},{"title":"ZM/Http","collapsable":true,"children":["ZM/Http/Response"]},{"title":"ZM/Module","collapsable":true,"children":["ZM/Module/ModuleBase","ZM/Module/ModuleUnpacker","ZM/Module/QQBot","ZM/Module/ModulePacker"]},{"title":"ZM/MySQL","collapsable":true,"children":["ZM/MySQL/MySQLQueryBuilder","ZM/MySQL/MySQLPool","ZM/MySQL/MySQLStatementWrapper","ZM/MySQL/MySQLWrapper"]},{"title":"ZM/Store","collapsable":true,"children":["ZM/Store/LightCacheInside","ZM/Store/LightCache","ZM/Store/ZMAtomic"]},{"title":"ZM/Store/Redis","collapsable":true,"children":["ZM/Store/Redis/ZMRedis"]},{"title":"ZM/Utils","collapsable":true,"children":["ZM/Utils/ZMUtil","ZM/Utils/DataProvider","ZM/Utils/HttpUtil","ZM/Utils/SignalListener","ZM/Utils/MessageUtil","ZM/Utils/Terminal","ZM/Utils/CoMessage"]},{"title":"ZM/Utils/Manager","collapsable":true,"children":["ZM/Utils/Manager/CronManager","ZM/Utils/Manager/ModuleManager","ZM/Utils/Manager/WorkerManager"]}] \ No newline at end of file diff --git a/docs/api/ZM/API/OneBotV11.md b/docs/api/ZM/API/OneBotV11.md index 2ff29f4d..3ef8ad18 100644 --- a/docs/api/ZM/API/OneBotV11.md +++ b/docs/api/ZM/API/OneBotV11.md @@ -3,24 +3,24 @@ ## get ```php -public function get(int|string $robot_id): ZMRobot +public function get(mixed $robot_id): ZMRobot ``` ### 描述 -获取机器人Action/API实例 +作者很懒,什么也没有说 ### 参数 | 名称 | 类型 | 描述 | | -------- | ---- | ----------- | -| robot_id | int|string | 机器人ID | +| robot_id | mixed | | ### 返回 | 类型 | 描述 | | ---- | ----------- | -| ZMRobot | 机器人实例 | +| ZMRobot | | ## getRandom @@ -31,13 +31,13 @@ public function getRandom(): ZMRobot ### 描述 -随机获取一个连接到框架的机器人实例 +作者很懒,什么也没有说 ### 返回 | 类型 | 描述 | | ---- | ----------- | -| ZMRobot | 机器人实例 | +| ZMRobot | | ## getAllRobot @@ -48,65 +48,19 @@ public function getAllRobot(): ZMRobot[] ### 描述 -获取所有机器人实例 +作者很懒,什么也没有说 ### 返回 | 类型 | 描述 | | ---- | ----------- | -| ZMRobot[] | 机器人实例们 | - - -## setCallback - -```php -public function setCallback(bool|Closure $callback): OneBotV11 -``` - -### 描述 - -设置回调或启用协程等待API回包 - -### 参数 - -| 名称 | 类型 | 描述 | -| -------- | ---- | ----------- | -| callback | bool|Closure | 是否开启协程或设置异步回调函数,如果为true,则协程等待结果,如果为false,则异步执行并不等待结果,如果为回调函数,则异步执行且调用回调 | - -### 返回 - -| 类型 | 描述 | -| ---- | ----------- | -| OneBotV11 | 返回本身 | - - -## setPrefix - -```php -public function setPrefix(int $prefix): OneBotV11 -``` - -### 描述 - -设置API调用类型后缀 - -### 参数 - -| 名称 | 类型 | 描述 | -| -------- | ---- | ----------- | -| prefix | int | 设置后缀类型,API_NORMAL为不加后缀,API_ASYNC为异步调用,API_RATE_LIMITED为加后缀并且限制调用频率 | - -### 返回 - -| 类型 | 描述 | -| ---- | ----------- | -| OneBotV11 | 返回本身 | +| ZMRobot[] | | ## sendPrivateMsg ```php -public function sendPrivateMsg(int|string $user_id, string $message, bool $auto_escape): array|bool +public function sendPrivateMsg(mixed $user_id, mixed $message, bool $auto_escape): null|array|bool ``` ### 描述 @@ -117,15 +71,15 @@ public function sendPrivateMsg(int|string $user_id, string $message, bool $auto_ | 名称 | 类型 | 描述 | | -------- | ---- | ----------- | -| user_id | int|string | 用户ID | -| message | string | 消息内容 | -| auto_escape | bool | 是否自动转义(默认为false) | +| user_id | mixed | | +| message | mixed | | +| auto_escape | bool | | ### 返回 | 类型 | 描述 | | ---- | ----------- | -| array|bool | 返回API调用结果(数组)或异步API调用状态(bool) | +| null|array|bool | | ## sendGroupMsg diff --git a/docs/api/ZM/Command/Module/ModuleListCommand.md b/docs/api/ZM/Command/Module/ModuleListCommand.md index 5075c52e..b7e82986 100644 --- a/docs/api/ZM/Command/Module/ModuleListCommand.md +++ b/docs/api/ZM/Command/Module/ModuleListCommand.md @@ -1 +1,24 @@ -# ZM\Command\Module\ModuleListCommand \ No newline at end of file +# ZM\Command\Module\ModuleListCommand + +## execute + +```php +public function execute(Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output): int +``` + +### 描述 + +作者很懒,什么也没有说 + +### 参数 + +| 名称 | 类型 | 描述 | +| -------- | ---- | ----------- | +| input | Symfony\Component\Console\Input\InputInterface | | +| output | Symfony\Component\Console\Output\OutputInterface | | + +### 返回 + +| 类型 | 描述 | +| ---- | ----------- | +| int | | diff --git a/docs/api/ZM/Command/Module/ModulePackCommand.md b/docs/api/ZM/Command/Module/ModulePackCommand.md index c22ae01f..5d2427aa 100644 --- a/docs/api/ZM/Command/Module/ModulePackCommand.md +++ b/docs/api/ZM/Command/Module/ModulePackCommand.md @@ -1 +1,24 @@ -# ZM\Command\Module\ModulePackCommand \ No newline at end of file +# ZM\Command\Module\ModulePackCommand + +## execute + +```php +public function execute(Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output): int +``` + +### 描述 + +作者很懒,什么也没有说 + +### 参数 + +| 名称 | 类型 | 描述 | +| -------- | ---- | ----------- | +| input | Symfony\Component\Console\Input\InputInterface | | +| output | Symfony\Component\Console\Output\OutputInterface | | + +### 返回 + +| 类型 | 描述 | +| ---- | ----------- | +| int | | diff --git a/docs/api/ZM/Utils/CoMessage.md b/docs/api/ZM/Utils/CoMessage.md index 92382d0f..bd14746f 100644 --- a/docs/api/ZM/Utils/CoMessage.md +++ b/docs/api/ZM/Utils/CoMessage.md @@ -3,7 +3,7 @@ ## yieldByWS ```php -public function yieldByWS(int $timeout, array $hang, array $compare): mixed +public function yieldByWS(array $hang, array $compare, int $timeout): mixed ``` ### 描述 @@ -14,9 +14,9 @@ public function yieldByWS(int $timeout, array $hang, array $compare): mixed | 名称 | 类型 | 描述 | | -------- | ---- | ----------- | -| timeout | int | | | hang | array | | | compare | array | | +| timeout | int | | ### 返回 diff --git a/docs/api/ZM/Utils/Manager/ModuleManager.md b/docs/api/ZM/Utils/Manager/ModuleManager.md index 51530044..1046a4d9 100644 --- a/docs/api/ZM/Utils/Manager/ModuleManager.md +++ b/docs/api/ZM/Utils/Manager/ModuleManager.md @@ -20,7 +20,7 @@ public function getConfiguredModules(): array ## packModule ```php -public function packModule(mixed $module): bool +public function packModule(array $module, string $target): bool ``` ### 描述 @@ -31,7 +31,8 @@ public function packModule(mixed $module): bool | 名称 | 类型 | 描述 | | -------- | ---- | ----------- | -| module | mixed | | +| module | array | 模块信息 | +| target | string | 目标路径 | ### 返回 diff --git a/docs/api/ZM/Utils/MessageUtil.md b/docs/api/ZM/Utils/MessageUtil.md index 14976f34..99ffc232 100644 --- a/docs/api/ZM/Utils/MessageUtil.md +++ b/docs/api/ZM/Utils/MessageUtil.md @@ -3,7 +3,7 @@ ## downloadCQImage ```php -public function downloadCQImage(mixed $msg, null $path): array|false +public function downloadCQImage(mixed $msg, string $path): array|false ``` ### 描述 @@ -15,7 +15,7 @@ public function downloadCQImage(mixed $msg, null $path): array|false | 名称 | 类型 | 描述 | | -------- | ---- | ----------- | | msg | mixed | | -| path | null | | +| path | string | | ### 返回