From 1a930dc604fc60e2362d32f8b8f8ab641c1e7471 Mon Sep 17 00:00:00 2001 From: snowy Date: Sat, 20 Apr 2024 17:02:57 +0800 Subject: [PATCH] =?UTF-8?q?:sparkles:=20=E8=BD=BB=E9=9B=AAAPI=E6=96=87?= =?UTF-8?q?=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/deployment/config.md | 1 - docs/usage/lyapi.md | 45 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 docs/usage/lyapi.md diff --git a/docs/deployment/config.md b/docs/deployment/config.md index 0a1d9834..3c7cbe86 100644 --- a/docs/deployment/config.md +++ b/docs/deployment/config.md @@ -31,7 +31,6 @@ log_level: "INFO" # 日志等级 log_icon: true # 是否显示日志等级图标(某些控制台字体不可用) auto_report: true # 是否自动上报问题给轻雪服务器 auto_update: true # 是否自动更新轻雪,每天4点检查更新 -alconna_use_command_start: false # alconna是否使用默认指令前缀,默认false alconna_auto_completion: false # alconna是否自动补全指令,默认false,建议开启 safe_mode: false # 安全模式,开启后将不会加载任何第三方插件 diff --git a/docs/usage/lyapi.md b/docs/usage/lyapi.md new file mode 100644 index 00000000..5be5159a --- /dev/null +++ b/docs/usage/lyapi.md @@ -0,0 +1,45 @@ +--- +title: 轻雪API +icon: code +order: 4 +category: 使用指南 +tag: + - 配置 + - 部署 +--- + +## **轻雪API** + +轻雪API是轻雪运行中部分服务的支持,由`go`语言编写,例如错误反馈,图床链接等,目前服务由轻雪服务器提供,用户无需额外部署 + +接口 + +- `url` `https://api.liteyuki.icu` + +- `POST` `/register` 注册一个Bot + - 参数 + - `name` `string` Bot名称 + - `version` `string` Bot版本 + - `version_id` `int` Bot版本ID + - `python` `string` Python版本 + - `os` `string` 操作系统 + - 返回 + - `code` `int` 状态码 + - `liteyuki_id` `string` 轻雪ID + +- `POST` `/bug_report` 上报错误 + - 参数 + - `liteyuki_id` `string` 轻雪ID + - `content` `string` 错误信息 + - `device_info` `string` 设备信息 + - 返回 + - `code` `int` 状态码 + - `report_id` `string` 错误ID + +- `POST` `/upload_image` 图床上传 + - 参数 + - `image` `file` 图片文件 + - `liteyuki_id` `string` 轻雪ID,用于鉴权 + - 返回 + - `code` `int` 状态码 + - `url` `string` 图床链接 \ No newline at end of file