From ca3228855a134ac362b729b19bea3488824f66fc Mon Sep 17 00:00:00 2001 From: JustSong Date: Fri, 5 Apr 2024 01:29:22 +0800 Subject: [PATCH] docs: update API docs --- .gitignore | 1 + docs/API.md | 11 ++++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 974fcf63..2a8ae16e 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ build logs data /web/node_modules +cmd.md \ No newline at end of file diff --git a/docs/API.md b/docs/API.md index 72ae7d91..0b7ddf5a 100644 --- a/docs/API.md +++ b/docs/API.md @@ -41,4 +41,13 @@ One API 使用 JSON 格式进行请求和响应。 "quota": 100000, "remark": "充值 100000 额度" } -``` \ No newline at end of file +``` + +## 其他 +### 充值链接上的附加参数 +One API 会在用户点击充值按钮的时候,将用户的信息和充值信息附加在链接上,例如: +`https://example.com?username=root&user_id=1&transaction_id=4b3eed80-55d5-443f-bd44-fb18c648c837` + +你可以通过解析链接上的参数来获取用户信息和充值信息,然后调用 API 来为用户充值。 + +注意,不是所有主题都支持该功能,欢迎 PR 补齐。 \ No newline at end of file