Files
BlueArchiveToolkit/docs/api/README.md
T

47 lines
1.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# API 文档
本目录包含 BlueArchive Toolkit 的 API 文档。
## OpenAPI 规范
OpenAPI 文档位于 `openapi/` 目录,使用 OpenAPI 3.0 标准。
## 文档生成
API 文档将在开发过程中自动生成和更新。
**计划**
- 使用 `swag` (Go) 从代码注释生成 OpenAPI 文档
- 提供 Swagger UI 在线查看
- 支持导出为 Markdown、HTML 等格式
---
## 核心 API 端点(规划中)
### 认证
- `POST /api/v1/auth/login` - 用户登录
- `POST /api/v1/auth/logout` - 用户登出
- `POST /api/v1/auth/refresh` - 刷新 Token
### 翻译管理
- `GET /api/v1/translations` - 获取翻译列表
- `POST /api/v1/translations` - 创建翻译
- `PUT /api/v1/translations/:id` - 更新翻译
- `DELETE /api/v1/translations/:id` - 删除翻译
### 术语管理
- `GET /api/v1/glossary` - 获取术语列表
- `POST /api/v1/glossary` - 创建术语
- `PUT /api/v1/glossary/:id` - 更新术语
- `DELETE /api/v1/glossary/:id` - 删除术语
### 资源同步
- `POST /api/v1/sync/start` - 启动同步
- `GET /api/v1/sync/status` - 查询同步状态
- `POST /api/v1/sync/cancel` - 取消同步
---
更多详细文档将在 Phase 6 实现 API Server 时补充。