Skip to content

上传缓存 ​

上传缓存接口管理已经生成的缓存快照。它适合网络不稳定或需要在多个受信设备之间转移数据的场景。

获取缓存列表 ​

http
POST /upload-cache/get
json
{
  "token": "<TOKEN>"
}

响应:

json
{
  "success": true,
  "msg": "success",
  "data": ["snapshot-001", "snapshot-002"]
}

上传缓存 ​

http
POST /upload-cache/upload
json
{
  "token": "<TOKEN>",
  "indexName": "snapshot-001",
  "SGWCMAID": "<QR_TEXT>",
  "customAimeUrl": ""
}
字段类型说明
indexNamestring要上传的缓存索引
SGWCMAIDstring页面要求的访问码/二维码文本
customAimeUrlstring可选自定义服务地址

响应中的 data 和 music 为服务端处理结果,客户端应展示 msg 并保留失败信息。

删除缓存 ​

http
POST /upload-cache/del
json
{
  "token": "<TOKEN>",
  "indexName": "snapshot-001"
}

删除后返回新的列表或删除结果。该操作不可逆,调用前应二次确认。

下载缓存文件 ​

http
POST /upload-cache/get-file
json
{
  "token": "<TOKEN>",
  "indexName": "snapshot-001"
}

响应中的 data 由服务端定义,客户端应按 Content-Type 和 JSON 字段处理,不要假设所有版本返回同一种结构。

Released under the CC BY-NC-SA 4.0 License.