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

garmin.get_api_data returns text instead of json #117

Closed
psdupvi opened this issue Jan 25, 2023 · 1 comment
Closed

garmin.get_api_data returns text instead of json #117

psdupvi opened this issue Jan 25, 2023 · 1 comment

Comments

@psdupvi
Copy link
Contributor

psdupvi commented Jan 25, 2023

Line 599-605 has the following code

    def get_hrv_data(self, cdate: str) -> Dict[str, Any]:
        """Return Heart Rate Variability (hrv) data for current user."""

        url = f"{self.garmin_connect_hrv_url}/{cdate}"
        logger.debug("Requesting Heart Rate Variability (hrv) data")

        return self.modern_rest_client.get(url).text #.json()

Is there a reason we're using .text instead of .json() here? Everything else uses .json(), and this data appears to be in the JSON format

@cyberjunky
Copy link
Owner

I merged your fix in 0.1.52, thanks again!

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

No branches or pull requests

2 participants