Skip to content
This repository has been archived by the owner on Sep 7, 2023. It is now read-only.
/ steamhistory Public archive

📈 Steam application usage history recorder

License

Notifications You must be signed in to change notification settings

gentlecat/steamhistory

Repository files navigation

Steam History GoDoc

Steam distributes thousands of games and used by millions of PC gamers every day to play games and interact with their friends and the rest of the community. Steam provides some stats about usage, but there is not much info available. Steam History project tries to solve part of this problem by allowing you to record usage history for all apps distributed on Steam.

Data sources

There are two Steam Web API interfaces that are used to collect usage info:

  1. ISteamApps/GetAppList - list of all apps available in Steam Store;
  2. ISteamUserStats/GetNumberOfCurrentPlayers - current number of users for a specified app.

First we need to get list of apps to know their IDs and names. This list is saved in a local database and serves as a reference during usage history recording process. It is worth mentioning that GetAppList method returns not only applications, but also every single DLC, video, soundtrack and other not_so_useful stuff. These "apps" always have 0 active users so there is no need to save their usage history.

After creating list of apps, history recording process becomes pretty straightforward: get number of users for each usable app periodically and save it in a database. List of all apps needs to be updated too. We don’t want to miss any release.

Storage

For simplicity, SQLite database is created for each application. Each database contains only one table with two columns: timestamp (PK) and number of users. Most queries work with a single app. For example, adding a new usage history record or retrieving all of them.

List of all apps and information about them is saved in another database. This information includes: app ID, name, and boolean value that indicates if app is usable.

Detecting unusable apps

Some apps returned by Steam Web API cannot be run in Steam Client. That means their user count is always 0, which makes them easily detectable. Detection of these apps is done periodically by marking apps as unusable if their average user count is less then 1.

About

📈 Steam application usage history recorder

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages