docs: add API docs

This commit is contained in:
JustSong
2024-04-05 00:40:48 +08:00
parent 76569bb0b6
commit 054b00b725
2 changed files with 18 additions and 0 deletions

17
docs/API.md Normal file
View File

@@ -0,0 +1,17 @@
# 使用 API 操控 & 扩展 One API
> 欢迎提交 PR 在此放上你的拓展项目。
## 鉴权
One API 支持两种鉴权方式Cookie 和 Token对于 Token参照下图获取
![image](https://github.com/songquanpeng/songquanpeng.github.io/assets/39998050/c15281a7-83ed-47cb-a1f6-913cb6bf4a7c)
之后,将 Token 作为请求头的 Authorization 字段的值即可,例如下面使用 Token 调用测试渠道的 API
![image](https://github.com/songquanpeng/songquanpeng.github.io/assets/39998050/1273b7ae-cb60-4c0d-93a6-b1cbc039c4f8)
## API 列表
> 当前 API 列表不全,请自行通过浏览器抓取前端请求
欢迎此处 PR 补充。
如果现有的 API 没有办法满足你的需求,欢迎提交 issue 讨论。