【问题标题】:Steam API - Game Controller SupportSteam API - 游戏控制器支持
【发布时间】:2015-01-20 21:55:00
【问题描述】:

我正在使用 Steam API 来获取向用户展示的游戏列表,并且很高兴知道该游戏是否支持控制器。有没有办法通过 Steam API 确定游戏是否具有完整或部分控制器支持?

【问题讨论】:

    标签: steam steam-web-api


    【解决方案1】:

    您可以使用 appdetails 调用通过非官方 StoreFront API 找到此信息。

    http://store.steampowered.com/api/appdetails/?appids=<<APPID>>&filters=categories
    

    &lt;&lt;APPID&gt;&gt; 替换为数字应用程序ID。这将返回一个类似于此的 json 对象:

    {
        "440":{
            "success":true,
            "data":{
                "categories":[
                    {"id":"1","description":"Multi-player"},
                    {"id":"27","description":"Cross-Platform Multiplayer"},
                    {"id":"22","description":"Steam Achievements"},
                    {"id":"14","description":"Commentary available"},
                    {"id":"13","description":"Captions available"},
                    {"id":"31","description":"VR Support"},
                    {"id":"15","description":"Stats"},
                    {"id":"8","description":"Valve Anti-Cheat enabled"},
                    {"id":"18","description":"Partial Controller Support"},
                    {"id":"17","description":"Includes level editor"},
                    {"id":"29","description":"Steam Trading Cards"},
                    {"id":"30","description":"Steam Workshop"}
                ]
            }
        }
    }
    

    categories 键中,您需要查找两个ID。如果您查找id17,则表示“部分控制器支持”。如果您查找 28 中的 id,则表示“完全支持控制器”,并且在列表中如下所示:

    {"id":"28","description":"Full controller support"}
    

    【讨论】:

      猜你喜欢
      • 2018-03-02
      • 1970-01-01
      • 2022-12-12
      • 2021-11-29
      • 1970-01-01
      • 2018-02-11
      • 1970-01-01
      • 2021-01-26
      • 1970-01-01
      相关资源
      最近更新 更多