跳转到内容
开发者文档 / 资源接口

按 ID 获取资源

根据资源 ID 获取资源详情。

GET/api/resources/{resourceId}

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

路径参数

参数类型必填说明
resourceIdinteger是资源 ID
bash
curl 'https://resource-api.xyeidc.com/api/resources/42' \
  -H 'Api-Key: YOUR_API_KEY' \
  -H 'Api-Secret: YOUR_API_SECRET'

响应示例

json
{
  "code": 200,
  "msg": "Success!",
  "data": {
    "id": 42,
    "uuid": "7e061acf-329f-44dc-af82-1dbba589af99",
    "resourceTypeId": 4,
    "memberId": 10001,
    "name": "Example Mod",
    "englishName": "Example Mod",
    "identify": "example-mod",
    "description": "示例资源",
    "customTags": "冒险;实用",
    "logoImgUuid": "d3f6a8b1",
    "headImgUuid": "7e2c4a90",
    "verified": true,
    "archived": false
  }
}

图片可通过 /client/members/pics/{uuid} 访问;资源不存在时返回 404 Not Found!。