Steam API - 游戏控制器支持

时间:2014-11-22 23:14:55

标签: steam steam-web-api

我正在使用Steam API来获取向用户显示的游戏列表,并且知道游戏是否支持控制器会很高兴。有没有办法找出一个游戏是否有来自Steam API的完整或一些控制器支持?

1 个答案:

答案 0 :(得分:1)

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

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

<<APPID>>替换为数字应用程序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。如果您查找id 17,则表示“部分控制器支持”。如果您查找id 28,则表示“完全控制器支持”,并在列表中显示如下:

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