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
263 stars 43 forks source link

Wrong PublishedFileDetailsModel.Visibility value for friends-only / private items #99

Closed oliver4888 closed 4 years ago

oliver4888 commented 4 years ago

As the title suggests, using the SteamRemoteStorage interface, the library returns PublishedFileVisibility.Public for workshop items that are either Friends Only or Private. I looked at these workshop items in Postman and it appears that only the publishedfileid and result fields are returned for Friends Only or Private items:

image

It seems that "result": 9 is some kind of generic error code.

babelshift commented 4 years ago

Since the "visibility" property is missing from the response for those items with result = 9, the PublishedFileVisibility enum is being set to the default value 0 (Public).

I might be able to update the JSON parser to instead default to something like "Unknown".