steamhistory

module
v0.0.0-...-f06996e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 18, 2017 License: Apache-2.0

README

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.

Directories

Path Synopsis
Collector can be used to update apps' metadata and record usage history.
Collector can be used to update apps' metadata and record usage history.
apps
Package apps provides methods to update data related to applications.
Package apps provides methods to update data related to applications.
steam
Package steam provides interface to some parts of Steam Web API.
Package steam provides interface to some parts of Steam Web API.
usage
Package usage provides functions to record application usage history.
Package usage provides functions to record application usage history.
Usage: processor command Commands: detect-usable-apps - Detect usable apps detect-unusable-apps - Detect unusable apps cleanup - Usage history cleanup
Usage: processor command Commands: detect-usable-apps - Detect usable apps detect-unusable-apps - Detect unusable apps cleanup - Usage history cleanup
Usage: reporter command Commands: run-server - Start FastCGI server at 127.0.0.1:9000 run-server-dev - Start development server at localhost:8080
Usage: reporter command Commands: run-server - Start FastCGI server at 127.0.0.1:9000 run-server-dev - Start development server at localhost:8080
analysis
Package analysis provides functions that can help analyze collected data.
Package analysis provides functions that can help analyze collected data.
server
Package server provides web interface to view collected data.
Package server provides web interface to view collected data.
storage

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL