-
Notifications
You must be signed in to change notification settings - Fork 35
Steam API example #129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Steam API example #129
Conversation
I can take a look at this in a couple days, if no one does prior. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code and functionality look good to me.
I think it would be good to add a comment or two with info about how to get a steam API key and how to find the steam ID for your user account. Google got me to both items, but a point in the right direction from a comment in the example would be helpful.
I wish that their API returned more plain text rather than ID links to other objects. It'd be interesting to see the breakdown of game titles with hours played for each, but it seems like it'd require additional calls into their API to match up IDs to game titles.
I don't think it matters too much for this example, but during testing I found that the API omits free games from the results. This SO post shows a URL param that can be added to include them. Which in my case means the scary number that came out the first time wasn't even the real number, it got much scarier once it included the stats for one of my highest played games =x
That makes a lot of sense why my total game # was different from the amount of game titles it returned. Added As for showing time played for every title that's absolutely possible and rather easy. I bypassed that for the harder challenge which was taking every single game it spit out and summed the total time played from every game. Like I said in the meeting, if you play a lot of games you might not want to see that number. 😆 Added URL's to the API docs and key at least where it resides for now. One thing I've learned about API's is they'll change URL's sometimes so do you include it or not. At least they'll work for the time being. Submitting changes in a commit/PR. |
Added URLs for developer docs. Request now pulls all free games too.
split up long lines
have to run black EVERY time a file changes??
pylint & black hate me. looks like that one went through. |
Without free games included Attempting to GET STEAM Stats!
===============================
Total Games: 153
Total Hours: 5286.65
Total Days: 220.277
Monotonic: 2299.87
Finished!
Next Update in 15 minutes With free games included Attempting to GET STEAM Stats!
===============================
Total Games: 156
Total Hours: 5320.8
Total Days: 221.7
Monotonic: 2379.57
Finished!
Next Update in 15 minutes
=============================== |
What would be truly scary is adding all of the games cost and spitting out a dollar amount. 😨 Requested changes made and committed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. I re-tested the latest version on a Feather ESP32-S2 TFT.
Thank you @DJDevon3!
Updating https://github.com/adafruit/Adafruit_CircuitPython_Requests to 1.13.1 from 1.13.0: > Merge pull request adafruit/Adafruit_CircuitPython_Requests#129 from DJDevon3/main Updating https://github.com/adafruit/Adafruit_CircuitPython_Bundle/circuitpython_library_list.md to NA from NA: > Updated download stats for the libraries
API example displays the sum total amount of time in hours and days playing video games on steam.