Add support for fetching reading progress (and improved type safety) #5
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.
Hi there! Thanks for creating this package. I'd wanted to add a feature for my own use and thought it might be helpful for others too.
This pull request adds the ability to fetch a user's reading progress for a book.
book.reading_progress(book_id, cookies)method would be the new method on the Book client to get the current progress (e.g., "70%"). This requires authentication, so I've added the necessary logic to handle session cookies for book-related requests. I also added a user-agent to book requests. This should HELP to prevent the 403 issues seen in Issue #4The README is also updated, and while adding the new feature, I ran the static type checker pyright and fixed a number of potential type-related issues in the parsing logic. This should make the code a bit more robust/future-proof without changing any existing functionality.
All existing methods are backward compatible, so these changes shouldn't break anything for current users.
Let me know if you have any feedback or suggestions.