什么是“ personastateflags”?

时间:2019-10-13 19:35:33

标签: node.js steam steam-web-api

我请求此端点https://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?key=XXX&steamids=76561198049710886

我得到这个答复:

{ 
  "response":{ 
    "players":[ 
      { 
        "steamid":"76561198049710886",
        "communityvisibilitystate":3,
        "profilestate":1,
        "personaname":"testing",
        "lastlogoff":1570961241,
        "profileurl":"https://steamcommunity.com/id/danpool/",
        "avatar":"https://steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/1b/1b5db030143e6110de8558adf4235ece591ddde1.jpg",
        "avatarmedium":"https://steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/1b/1b5db030143e6110de8558adf4235ece591ddde1_medium.jpg",
        "avatarfull":"https://steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/1b/1b5db030143e6110de8558adf4235ece591ddde1_full.jpg",
        "personastate":0,
        "realname":"John Doe",
        "primaryclanid":"103582791429521408",
        "timecreated":1317282093,
        "personastateflags":0,
        "loccountrycode":"NO"
      }
    ]
  }
}

但是我对personastateflags的含义感到困惑,我通过搜索找到了一些东西,但是它们都是不同的,而且官方文档没有关于它的任何信息。

我发现的最后一个是这个:

  1: 'Offline', 2: 'Online', 4: 'Golden',
  64: 'Online using Big Picture',
  256: 'Online using Web Client',
  512: 'Online using Mobile',
  1024: 'Online using Steam Controller'

但是personastateflags在大多数情况下是0,所以没有任何意义:/

我还尝试在在线时启动大图片模式,结果是“ 1024”,这是“使用Steam Controller联机”而不正确。

P.S。

我已成功使用此对象转换了personastate

   0: 'Offline', 1: 'Online', 2: 'Busy',
   3: 'Away', 4: 'Snooze', 5 :'Looking to Trade',
   6: 'Looking to Play'

1 个答案:

答案 0 :(得分:0)

我尚未阅读Steam文档,但这应该意味着用户处于离线状态。