GET 接口
https://hcwksum.com/wp-json/wksumhub/v1/latest
参数:platform 取 windows / linux / android,缺省为 windows;current 为客户端当前版本。顶层字段是所选平台的摘要,同时返回 platforms 三平台对象。
curl 示例
curl "https://hcwksum.com/wp-json/wksumhub/v1/latest?platform=windows¤t=0.1.0"
curl "https://hcwksum.com/wp-json/wksumhub/v1/latest?platform=linux¤t=0.1.0"
curl "https://hcwksum.com/wp-json/wksumhub/v1/latest?platform=android¤t=1.0.0"
非法 platform 返回 400 与 {"code":"invalid_platform"};current 必须是合法版本号(如 1.0.0),格式不合法时返回 400 {"code":"invalid_current"};不传 current 时 update_available 为 null。
JSON 响应示例(Windows)
{
"api": "wksumhub-update/1",
"product": "WksumUSBHub Pro",
"platform": "windows",
"version": "0.1.0",
"released_at": "2026-11-06",
"requires": "Windows 10/11 (x64)",
"available": true,
"download_url": "https://hcwksum.com/wp-content/uploads/downloads/wksumHubSetup.exe",
"file_name": "wksumHubSetup.exe",
"file_size": 120288598,
"sha256": "548B37B292FCB9D07ED132DA8D15BB968552E5F262A8BB09C7827E10589EDBB1",
"changelog": [
"首个公开版本:8 个功能页、电源时序、Blockly 流程、执行计划、CSV 采集、中英双语与深浅主题。"
],
"page_url": "https://hcwksum.com/download/",
"checked_at": "2026-11-10T07:33:08+00:00",
"current": "0.1.0",
"update_available": false,
"platforms": {
"windows": {
"version": "0.1.0",
"released_at": "2026-11-06",
"requires": "Windows 10/11 (x64)",
"available": true,
"file_name": "wksumHubSetup.exe",
"file_size": 120288598,
"sha256": "548B37B292FCB9D07ED132DA8D15BB968552E5F262A8BB09C7827E10589EDBB1"
},
"linux": {
"version": "0.1.0",
"released_at": "2026-11-09",
"requires": "Linux x86_64(已带 Qt 运行库)",
"available": true,
"file_name": "WksumUSBHub-Pro-0.1.0-linux-x86_64.tar.gz",
"file_size": 127163818,
"sha256": "D931210A8E8F2C752B63CD4BD9D60BABFB04A2CDEEE270758B552559A2CA9B2B"
},
"android": {
"version": "1.0.0",
"released_at": "2026-11-09",
"requires": "Android 7.0+(arm64)",
"available": true,
"file_name": "wksumHub-1.0.0.apk",
"file_size": 7585648,
"sha256": "93E62D88328003C356124FEC09A9A633CA4B83539CB0EFB8CABC0E9EBE8D8833"
}
}
}
update_available 为 true 表示有比 current 更新的版本;为 false 表示已是最新;为 null 表示请求没有携带 current。平台文件缺失时仍返回 200,但 available=false、download_url=null、file_size=0。