洛克王国道具图鉴
查询洛克王国209个道具、材料、性格等基础数据
GET
https://api.tinyaii.cn/v1/roco/dict
请求参数
| 参数名 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
| type | string | 可选 | 类型ID(1=性格,2=属性,3=道具) | — |
| keyword | string | 可选 | 关键词搜索 | — |
| page | int | 可选 | 页码,默认1 | — |
| page_size | int | 可选 | 每页条数,默认20,最大100 | — |
返回字段
| 字段 | 类型 | 说明 |
|---|---|---|
| data.total | int | 总数 |
| data.items | array | 道具列表 |
| data.items[].name | string | 名称 |
| data.items[].type_name | string | 类型(性格/属性/道具) |
| data.items[].description | string | 描述 |
| data.items[].is_worth | bool | 是否值得 |
返回示例
{
"code": 200,
"message": "success",
"data": {
"total": 209,
"items": [
{
"id": "170",
"name": "棱镜球",
"type_name": "道具",
"description": "昂贵且好用的咕噜球",
"is_worth": true
}
]
}
}
调用示例
curl "https://api.tinyaii.cn/v1/roco/dict?type=<type>&keyword=<keyword>" \
-H "Authorization: Bearer YOUR_API_KEY"const res = await fetch("https://api.tinyaii.cn/v1/roco/dict?type=<type>&keyword=<keyword>", {
headers: { "Authorization": "Bearer YOUR_API_KEY" },
});
console.log(await res.json());import requests
resp = requests.get(
"https://api.tinyaii.cn/v1/roco/dict",
params={"type": "<type>", "keyword": "<keyword>"},
headers={"Authorization": "Bearer YOUR_API_KEY"},
timeout=10,
)
print(resp.json())把 YOUR_API_KEY 换成你的密钥即可直接运行。密钥只保存在你自己的设备上。