-
-
Notifications
You must be signed in to change notification settings - Fork 142
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
Improve login by migrating Cloudscraper to Garth #144
Conversation
@matin Sorry to keep you waiting for so long, I had a busy time, and today I reserved the time to migrate yours and others work again! |
@matin I get these kind of error running the test, do I overlook something?
I will add the example.py back I think, found it handy, we could have both Jupyter and rest. |
I will need to convert my home assistant integration to use the new version. |
Amazing to see this merged! The issue with the tests has to do with the tests attempting to log in because there isn't a session saved. I'll update the README and also provide a way to run the tests without needing an active session. |
Ah of course. Yeah i'm quit happy with your work, needed a bit of searching around at first. |
I just created #149 for the tests. I'll look into DELETEs |
This branch can be installed with:
pip install git+https://github.com/matin/python-garminconnect.git@garth#egg=garminconnect
Garth uses the same API as the mobile app (see #141) and closes the following issues in the process:
This PR also adds a Jupyter Notebook with examples and tests using pytest and VCR to ensure requests are recorded and don't need to be repeated by someone running the tests. The test coverage is only 50%, but I recommend adding more tests in another PR vs trying to improve test coverage in this PR.
@cyberjunky Let me know if this looks good to you or if there are other changes you'd like to see. I deleted your example.py in favor of the Jupyter Notebook and tests as references, but I can add it back in. It's just a matter of updating how authentication is handled.