代码之家  ›  专栏  ›  技术社区  ›  Geert Plessers

Steam API getOwnedGames显示不在库中的游戏

  •  1
  • Geert Plessers  · 技术社区  · 11 年前

    我正在尝试使用Steam API来获取用户库中游戏的一些信息。

    当我用SteamID获得游戏时,我会看到像Source SDK这样的东西,还有很多演示和其他技术上不是我买的游戏的东西。

    有什么过滤器可以隐藏这些东西吗?

    This is the API information about the GetOwnedGames call

    1 回复  |  直到 11 年前
        1
  •  0
  •   Andy Ali    11 年前

    一种可能性是筛选具有 "playtime_forever": 0 .

    作为一个例子,这将从下面的片段中过滤appid 9、92、211。

            {
                "appid": 9,
                "playtime_forever": 0
            },
            {
                "appid": 92,
                "playtime_forever": 0
            },
            {
                "appid": 211,
                "playtime_forever": 0
            },
            {
                "appid": 440,
                "playtime_2weeks": 188,
                "playtime_forever": 107307
            },
    

    不过,这会抓住你的一切,因为“玩过”这些游戏的人会有游戏时间。因此,对于上面的内容,您会过滤掉源SDK,但对于另一个使用过它的用户,会出现SDK。