babelshift / SteamWebAPI2

🎮 C# / .NET library that makes it easy to use the Steam Web API. It conveniently wraps around all of the JSON data and ugly API details with clean methods, structures and classes.
MIT License
262 stars 43 forks source link

PlayingGameName/gameextrainfo not being returned? #54

Closed JayVDZ closed 6 years ago

JayVDZ commented 6 years ago

This doesn't appear to be an issue with the library, but the API from what I can see, but all the same I thought I'd raise the issue here to see if anyone else is getting this?

When calling GetPlayerSummariesAsync(), the PlayingGameName property is not set for a summary, even though there is a PlayingGameId set.

Making the call to the Steam API itself shows nothing returned for the gameextrainfo attribute, i.e: http://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?key=xxxxx&steamids=76561197960392732

Is anyone else experiencing this?

JayVDZ commented 6 years ago

Wrongly linked API docs above. Should be: https://partner.steamgames.com/doc/webapi/ISteamUser#GetPlayerSummaries Though this doesn't define the return data.

As a workaround, using the ISteamUserStats/GetSchemaForGame method with the previously obtained gameid, I get a game name, but in the case of the game I just tried (Cities: Skylines) it returned the wrong name (Colossal Order Game). Not sure what to do at this point. Continuing to rummage around he API for better game info.

babelshift commented 6 years ago

I will take a look at this more today and tomorrow.

On Jan 4, 2018 7:02 AM, "Jay Van Der Zant" notifications@github.com wrote:

Wrongly linked API docs above. Should be: https://partner.steamgames.com/doc/webapi/ISteamUser#GetPlayerSummaries Though this doesn't define the return data.

As a workaround, using the ISteamUserStats/GetSchemaForGame method with the previously obtained gameid, I get a game name, but in the case of the game I just tried (Cities: Skylines) it returned the wrong name (Colossal Order Game). Not sure what to do at this point. Continuing to rummage around he API for better game info.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/babelshift/SteamWebAPI2/issues/54#issuecomment-355265747, or mute the thread https://github.com/notifications/unsubscribe-auth/ACmOX87n5rab3dhOG_kuBJWPV2ULnq2iks5tHL3RgaJpZM4RPUOW .

JayVDZ commented 6 years ago

Thanks. It looks like the API no longer supports this attribute, so the PlayerSummaryModel.PlayingGameName attribute should probably be removed.

I got round this by using SteamApps.GetAppListAsync() to lookup the name using PlayerSummaryModel.PlayingGameId

babelshift commented 6 years ago

As you've suggested, it looks like this API has dropped the gameextrainfo property from the resulting JSON. As an example, here is what is returned for my account when playing Prison Architect. I think that your solution of making an extra call to find the game details is the only solution.

As for your wrong game name, I think it's actually correct, but the developer named their game oddly. The developer of Cities: Skylines is actually "Colossal Order", and it appears that they created the Steam package with a generic name while it was under development. You can confirm this by looking at the achievements in that GetSchema call and seeing that they align with Cities: Skylines.

{
  "steamid": "76561197960361544",
  "communityvisibilitystate": 3,
  "profilestate": 1,
  "personaname": "aro",
  "lastlogoff": 1515297892,
  "profileurl": "http://steamcommunity.com/id/aro/",
  "avatar": "https://steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/a9/a9e5bf672bb4c7837b9fbec8a76bc1184fb3b99f.jpg",
  "avatarmedium": "https://steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/a9/a9e5bf672bb4c7837b9fbec8a76bc1184fb3b99f_medium.jpg",
  "avatarfull": "https://steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/a9/a9e5bf672bb4c7837b9fbec8a76bc1184fb3b99f_full.jpg",
  "personastate": 1,
  "primaryclanid": "103582791435784710",
  "timecreated": 1063378043,
  "personastateflags": 0,
  "gameid": "233450"
}
babelshift commented 6 years ago

Let me know if you need more help. Thanks.