Consider supporting us as a GitHub Sponsor and get instant access to all our Unity assets, exclusive tools and assets, escalated support and issue tracking and our gratitude.
These articles are made possible by our GitHub Sponsors ... become a sponsor today!
This leverages the ISteamApp interface from Valve's Steam Web API and exposes the features of that API in a C# and Unity centric way.
Note we do not attempt to expose authorized endpoints. That is much of the Steam Web API requires a publisher key and should be called from a trusted web server not from a game client or a game server. We only expose those web API calls that do not require a publisher key.
What can it do?
The App Web interface can be used to read the news items from an App as they appear in Steam's backend such as patch notes and announcements and can also be used to find the published name of an app based on its app ID.
This is a data structure used only by this API to handle the results of the NewsForApp call
appid is the uint value of the AppId this data is related to
count is the total number of entries available in total (it seems)
newsitems is an array of SteamNewsItem objects as discribed below
publicDateTime Date =>get;
This object is not documented by Valve but its fields are mostly self explanitory. We added the Date field which will simply parse the "date" returned by Valve to a System.DateTime to make it easier to work with.
Fields and Attributes
Check if the list of apps has been loaded from Steam API.
publicstaticbool IsAppsListLoaded =>get;
Simply loads or attempts to load the list of apps available on Steam. This is required if you need to convert an AppId to the published app name for example if you wanted to list what game a user was playing based on that user's GameInfo.
This overload will load the app names for you if they are missing as such it is potentially asynchronious. That is if the names are already loaded it will invoke the callback instantly with the results otherwise it will load the names and invoke the callback when ready.
The call back should look as such
voidHandleResult(string name,bool ioFailure)
Debug.LogError("Unable to read the name");
Debug.Log("Found: "+ name);
This end point is not well documented by Valve however it does work to return the news entries for a given app and can be useful if you wanted to show that news in your game.
The appId is the app id you wish to return news for.
The count is how many entries you would like to get back, if you pass 0 it will default to 20
The feeds is a comma delimeted list of feeds to be read for example "steam_community_announcements"
The tags paramiter is a comma delimeted list of tags to filter on
Finally the callback, this will return the results as SteamAppNews object as well as an indication of error if any.