跳转到内容
开发者文档 / 资源版本分支接口

获取版本分支信息

获取指定资源下的一条版本分支详情。

GET/api/resources/{resourceId}/releases/{resourceReleaseId}

鉴权方式 请求头 Api-Key、Api-Secret

参数

位置参数类型必填说明
pathresourceIdinteger是资源 ID
pathresourceReleaseIdinteger是版本分支 ID
queryincludesstring否versions、cores、links,多个值用 ; 分隔
bash
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'

响应示例

json
{
  "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 生成;字段说明见创建下载地址。