game.queryDetail
此接口为平台应用(APP)服务端实现,由SUD OpenPaaS服务端调用。
按游戏包名查询游戏基本信息(不含运营区域)。对齐 ThirdPartyPlatformGameInfo;参考实现见 helloOP GET /developer/game/basic-info。
调用方式:
- HTTPS 调用
HTTPS 调用
http
POST {query_game_detail_webhook}请求参数 - Header
| 属性 | 类型 | 默认值 | 必填 | 说明 |
|---|---|---|---|---|
| Authorization | string | 是 | 格式:Bearer {access_token} |
请求参数 - Body
| 属性 | 类型 | 默认值 | 必填 | 说明 |
|---|---|---|---|---|
| bundle_id | string | 是 | 游戏包名(从 game.queryList 返回的 bundle_id 传入) |
返回值
Object
返回的 JSON 数据包
| 属性 | 类型 | 说明 |
|---|---|---|
| ret_code | integer | 响应码:0 表示成功,非0 表示失败 |
| ret_msg | string | 响应描述信息:成功返回 "success",失败返回具体错误原因 |
| data | object | 业务数据体(仅 ret_code=0 时返回) |
| data.bundle_id | string | 游戏包名 |
| data.name | string | 游戏名称 |
| data.icon | string | 游戏图标(图标集首项 URL;无图标时为空) |
| data.version | string | 最新版本号 |
| data.engine | string | 游戏开发引擎 |
| data.first_category | string | 一级分类 |
| data.second_category | string | 二级分类 |
| data.min_age | string | 适龄等级 |
| data.special_mechanism | string | 特殊机制 |
| data.introduction | string | 游戏简介 |
| data.description | string | 详细介绍 |
| data.service_phone | string | 客服电话 |
| data.service_email | string | 客服邮箱 |
| data.service_privacy | string | 服务隐私政策 |
| timestamp | long | 毫秒时间戳 |
ret_code 的合法值
| 值 | 说明 | 最低版本 |
|---|---|---|
| 0 | 请求成功 | |
| 40001 | invalid access_token,访问令牌无效或已过期 | |
| 40003 | game not found,未找到对应的游戏信息 |
cURL 请求
bash
curl -X POST \
{query_game_detail_webhook} \
-H 'Authorization: Bearer {access_token}' \
-H 'Content-Type: application/json; charset=utf-8' \
-d '{
"bundle_id": "com.example.game.demo"
}'成功返回
json
{
"ret_code": 0,
"ret_msg": "success",
"data": {
"bundle_id": "com.example.game.demo",
"name": "示例游戏",
"icon": "https://cdn.example.com/icon.png",
"version": "1.0.0",
"engine": "Unity",
"first_category": "休闲",
"second_category": "益智",
"min_age": "8+",
"special_mechanism": "",
"introduction": "轻松益智休闲玩法",
"description": "经典三消类休闲游戏,玩法轻松趣味十足",
"service_phone": "400-123-4567",
"service_email": "support@example.com",
"service_privacy": "https://example.com/privacy"
},
"timestamp": 1719820800000
}错误返回
json
{
"ret_code": 40001,
"ret_msg": "invalid access_token"
}