Skip to content

game.queryDetail ​

此接口为平台应用(APP)服务端实现,由SUD OpenPaaS服务端调用。

按游戏包名查询游戏基本信息(不含运营区域)。对齐 ThirdPartyPlatformGameInfo;参考实现见 helloOP GET /developer/game/basic-info。

调用方式:

  • HTTPS 调用

HTTPS 调用 ​

http
POST {query_game_detail_webhook}

请求参数 - Header ​

属性类型默认值必填说明
Authorizationstring是格式:Bearer {access_token}

请求参数 - Body ​

属性类型默认值必填说明
bundle_idstring是游戏包名(从 game.queryList 返回的 bundle_id 传入)

返回值 ​

Object ​

返回的 JSON 数据包

属性类型说明
ret_codeinteger响应码:0 表示成功,非0 表示失败
ret_msgstring响应描述信息:成功返回 "success",失败返回具体错误原因
dataobject业务数据体(仅 ret_code=0 时返回)
data.bundle_idstring游戏包名
data.namestring游戏名称
data.iconstring游戏图标(图标集首项 URL;无图标时为空)
data.versionstring最新版本号
data.enginestring游戏开发引擎
data.first_categorystring一级分类
data.second_categorystring二级分类
data.min_agestring适龄等级
data.special_mechanismstring特殊机制
data.introductionstring游戏简介
data.descriptionstring详细介绍
data.service_phonestring客服电话
data.service_emailstring客服邮箱
data.service_privacystring服务隐私政策
timestamplong毫秒时间戳

ret_code 的合法值 ​

值说明最低版本
0请求成功
40001invalid access_token,访问令牌无效或已过期
40003game 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"
}