UPDATE – Game Picker Playtime Filter

Category: | Posted on:September 2, 2021
game picker 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.

Related Logs


  • NEW PROJECT – Catholic Liturgical Date Checker

    May 29, 2024

    The Liturgical Date Checker project uses the Liturgical Calendar API to display information about Catholic Holy days. On page load it fetches info for today, tomorrow, and yesterday. It also has a search field that will return celebration info about a specific date. Objective This is just more basic API practice. I started this in […]

    Continue Reading
  • NEW PROJECT – Logo Finder

    March 7, 2024

    As part of my React API practice, I built a dirt simple Logo Finder using Clearbit’s Logo API. Simply enter a web domain, and the app will retrieve a logo image. Objective This is the third in a series of simple API fetching apps that I’ve built so far this year after the Public API’s […]

    Continue Reading
  • NEW PROJECT – Open Library Search

    February 25, 2024

    Added another API fetching project, Open Library Search. The app pings the Internet Archive‘s Open Library Search API to retrieve author, publication, purchase, and topic data for a user-provided book title. Objective My goal is to continue cranking out simple fetch projects until I can do them without relying on a crutch. I used my […]

    Continue Reading