UPDATE – Game Picker Playtime Filter
Pursuant to my co-workers’ feedback, I added a playtime filter to the Game Picker 9000. Now the Game Picker can ignore games you’ve played already. Additionally, the Game Picker now prints the total playtime of each game in the main listing.
Playtime Filter Implementation
The Game Picker 9000 uses the GetOwnedGames method within the Steam Web API. This returns game data like the title, app id, image icons, and total playtime. The API formats the data in seconds, so I did a little division to get it to print in hours. Then I added a filter to the initial GET request. Ultimately, I decided on two hours for the threshold. Anything over that counts as “played”. This allows some flexibility for games that may have started themselves after install, or games that were started but not finished.
Troubleshooting
I had a friend test the new filter with their own Steam ID, and initially thought it was broken. The filter didn’t seem to be working. It returned all of the games in the person’s library with playtimes of zero, which was not accurate to the information on their account. Turns out, the Steam Web API limits your access to a user’s data based on whether said user’s account is public or private. If it’s private, the playtimes are off-limits, and the Game Picker returns a value of zero for all of them. There isn’t really a way around this issue. It’s just the way the API works, and it appears founded in solid privacy concerns. So, I had to ameliorate it within the UX. I added a disclaimer to the filter to clarify the limitations.