参数
| 位置 | 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
| path | resourceId | integer | 是 | 资源 ID |
| path | resourceReleaseId | integer | 是 | 版本分支 ID |
| query | includes | string | 否 | versions、cores、links,多个值用 ; 分隔 |
curl 'https://resource-api.xyeidc.com/api/resources/42/releases/649?includes=versions%3Bcores%3Blinks' \
-H 'Api-Key: YOUR_API_KEY' \
-H 'Api-Secret: YOUR_API_SECRET'
响应示例
{
"code": 200,
"msg": "Success!",
"data": {
"id": 649,
"uuid": "21e17bc8-b755-497b-a4cd-90cdb8ee51b3",
"resourceId": 42,
"label": "1.0.0",
"type": "CLIENT",
"channel": "RELEASE",
"notes": "首个稳定版本",
"fileUuid": null,
"fileName": null,
"fileType": null,
"orderNum": 1000,
"downloadCount": 0,
"versions": [{"id": 419, "name": "1.20.1"}],
"cores": [{"id": 25, "name": "Fabric"}],
"links": [{
"id": 9001,
"linkType": "GITHUB",
"displayType": "URL_QR_CODE",
"url": "https://github.com/example/example-mod/releases",
"info": "GitHub Releases",
"orderNum": 0
}]
}
}
资源启用打赏后下载时,未满足条件的用户可能收到业务错误提示。
links 的展开需要 includes=links,并受资源登录下载设置限制。每条链接的 linkType 表示来源,displayType 表示展示方式(URL、URL_QR_CODE、QR_CODE),二维码使用同一条记录的 url 生成;字段说明见创建下载地址。
