Skip to content
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

Refactor and fix handling of goodreads api when currently reading contains a single item #2

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

AntoineDrouhin
Copy link

This pull request

The refactor has been produced in order to improve on the architecture, I am willing to add several optional features to this project in the future, with the idea of preserving the current default behavior.

I can keep it on my fork, but I would be happy to contribute more to this repo if you are interested, let me know!

- Put all goodreads api related methods in a dedicated class
- Put all github api related methods in a dedicated class
- Put all output formatting in a dedicated class
- Prepare the ground for dependency injection and more increased
testability
- Didn't change any behavior

This commit is intended to prepare future work. Design choices made here
are also a matter of preference.
When getting reviews from goodreads api, if a single result was
returned, it was not returned as an array. I fixed this by casting the result to an array.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error thrown when currently reading books list contains a single item
1 participant