Goodreads yearly reading challenge progress tracker - #1149
Merged
Conversation
gencode and copying over original code for gooreads app.
Ran the following Pixlet commands to verify output: Profile Format lint check Moved to a secret key for my own Goodreads challenge ID Removed testing code Changed the schema text Added a readme.md
panderson54
requested review from
betterengineering and
matslina
as code owners
February 20, 2023 06:09
|
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
Contributor
Author
|
I have read the CLA Document and I hereby sign the CLA |
matslina
requested changes
Feb 21, 2023
Updated the cache naming to append the challengeID Move information about where to find the challenge ID into the app description rather than the schema description
panderson54
requested review from
matslina
and removed request for
betterengineering
February 22, 2023 06:47
matslina
reviewed
Mar 2, 2023
matslina
reviewed
Mar 2, 2023
matslina
approved these changes
Mar 2, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
About:
This app displays the progress of the user towards their yearly reading challenge goals as tracked by the Goodreads site. Goodreads is integrated into kindle devices so the desired workflow is someone finishes a book on their kindle and automatically sees the progress on their tidbyt within one day.
Display:
The app displays different graphics tracking your progress from 0 - 13 books, the average person reads 12 books a year so this seemed a natural stopping point. I may at a later point add more animations or some sort of dynamic image.
Getting Data:
Goodreads had killed off its public API in 2020. Given what I am calling a challenge ID (not a user ID nor as far as I can tell derived from your users ID) https://www.goodreads.com/user_challenges/{challenge_id} will serve up any public profile's yearly reading challenge. The app makes a GET request to https://www.goodreads.com/user_challenges/{challenge_id and parses the returned HTML using starlark's regex libary to pull reading progress and goals from a div entitled 'progressText'.
Parsing HTML is more fragile than making a real API call, this page has been stable and Goodreads is not frequently updated but this is obviously more fragile than a proper API call. Should Amazon/Goodreads allow public API calls again I will update this app to use a more stable endpoint.