Add docs for CurseForge Meta API endpoints

This commit is contained in:
CPTProgrammer 2026-07-11 08:55:02 +08:00
parent cbce560805
commit e8bcd18c76
No known key found for this signature in database
2 changed files with 75 additions and 0 deletions

View File

@ -0,0 +1,74 @@
# CurseForge Meta API
> 来源https://docs.curseforge.com/rest-api/
>
> API 基础地址:`https://api.curseforge.com`认证方式Header `x-api-key: <token>`
---
## Get Minecraft Versions
```
GET https://api.curseforge.com/v1/minecraft/version
```
获取 CurseForge 支持的 Minecraft 版本列表,每条记录包含版本号、下载地址、审核状态等信息。
### 参数
无需参数。
### 成功响应
```jsonc
{
"data": [
{
"id": 1, // 版本记录 ID
"gameVersionId": 123, // Game Version ID
"versionString": "1.21.5", // 版本号字符串
"jarDownloadUrl": "https://...", // JAR 文件下载地址
"jsonDownloadUrl": "https://...", // JSON 文件下载地址
"approved": true, // 是否已审核通过
"dateModified": "2025-01-01T00:00:00Z", // 最后修改时间ISO 8601
"gameVersionTypeId": 1, // Game Version Type ID
"gameVersionStatus": 1, // 版本状态(见附表)
"gameVersionTypeStatus": 1 // 版本类型状态(见附表)
}
]
}
```
### 响应字段
| 字段 | 类型 | 说明 |
|------|------|------|
| `id` | int32 | 版本记录 ID |
| `gameVersionId` | int32 | Game Version ID |
| `versionString` | string | 版本号字符串(如 `"1.21.5"` |
| `jarDownloadUrl` | string | JAR 文件下载地址 |
| `jsonDownloadUrl` | string | JSON 文件下载地址 |
| `approved` | boolean | 是否已审核通过 |
| `dateModified` | string (date-time) | 最后修改时间ISO 8601 |
| `gameVersionTypeId` | int32 | Game Version Type ID |
| `gameVersionStatus` | GameVersionStatus | 版本状态(见附表) |
| `gameVersionTypeStatus` | GameVersionTypeStatus | 版本类型状态(见附表) |
---
## 附表
### GameVersionStatus
| 值 | 含义 |
|----|------|
| 1 | Approved — 已审核通过 |
| 2 | Deleted — 已删除 |
| 3 | New — 新增 |
### GameVersionTypeStatus
| 值 | 含义 |
|----|------|
| 1 | Normal — 正常 |
| 2 | Deleted — 已删除 |

View File

@ -103,6 +103,7 @@ src/types/
|------|------|
| `upload.md` | 上传文件 API含 Game Version Types / Game Versions 查询) |
| `get.md` | 获取文件列表 API`GET /mods/{modId}/files` |
| `get-meta.md` | 元数据查询 API获取 Minecraft 版本列表等) |
### 前端框架与组件库