如何在不登录Steam的情况下检索当前正在玩的游戏
本文关键字:游戏 检索 情况下 登录 Steam | 更新日期: 2023-09-27 18:30:02
我一直在使用一些简化的Steam API,但我没有得到太多。我想得到一些帮助,在用户不登录的情况下检索用户的状态(这是我找到如何做到这一点的唯一方法)。
我假设您正在查找用户的联机/脱机状态。为了得到这个,你可以使用这个API调用:
http://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?key=APIKEY&steamids=IDS YOU ARE LOOKING AT
此处的文档:GetPlayerSummaries
不管用户的隐私设置如何,您都会发现personastate
包含用户的状态。从文件
The user's current status. 0 - Offline, 1 - Online, 2 - Busy, 3 - Away, 4 - Snooze, 5 - looking to trade, 6 - looking to play. If the player's profile is private, this will always be "0", except is the user has set his status to looking to trade or looking to play, because a bug makes those status appear even if the profile is private.
该文档还显示了公共/私人配置文件中可用的其他字段,可能值得一看。