【问题标题】:How can I see a player status (online, offline, playing ...) with Steam Web API?如何使用 Steam Web API 查看玩家状态(在线、离线、正在玩……)?
【发布时间】:2016-07-12 07:38:42
【问题描述】:

我必须检查用户的状态: - 在线的 - 离线 - 玩[游戏名/游戏ID]

如何通过 Steam Web API 获取我需要的信息?

【问题讨论】:

    标签: api web status steam


    【解决方案1】:

    https://api.steampowered.com/ISteamUser/GetPlayerSummaries/v2/?key=APIKEY&format=json&steamids=STEAMID

    回复:

    "players": [
        {
            "steamid": "...",
            "communityvisibilitystate": 3,
            "profilestate": 1,
            "personaname": "...",
            "lastlogoff": 1468736909,
            "commentpermission": 1,
            "profileurl": "http://steamcommunity.com/id/.../",
            "avatar": "https://steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/...jpg",
            "avatarmedium": "https://steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/..._medium.jpg",
            "avatarfull": "https://steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/..._full.jpg",
            "personastate": 1,
            "primaryclanid": "...",
            "timecreated": 1312034848,
            "personastateflags": 0,
            "gameextrainfo": "Counter-Strike: Global Offensive",
            "gameid": "730",
            "loccountrycode": "AU",
            "locstatecode": "VIC",
            "loccityid": 4990
        }
    ]
    

    角色状态:1 - 在线;
    gameextraininfo: 游戏;
    游戏ID:游戏ID。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-11-07
      • 2019-10-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多