From 58042948a8a612147b1d2cd460b939c7d2a8ff5a Mon Sep 17 00:00:00 2001 From: Hannah Date: Tue, 20 Aug 2024 22:32:35 -0400 Subject: [PATCH] update URL and path to result data --- myfitnesspal/client.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/myfitnesspal/client.py b/myfitnesspal/client.py index 8b8b348..a3c517a 100644 --- a/myfitnesspal/client.py +++ b/myfitnesspal/client.py @@ -818,7 +818,7 @@ def _get_url_for_report( return ( parse.urljoin( self.BASE_URL_SECURE, - "reports/results/" + report_category.lower() + "/" + report_name, + "api/services/reports/results/" + report_category.lower() + "/" + report_name, ) + f"/{str(delta.days)}.json" ) @@ -826,7 +826,7 @@ def _get_url_for_report( def _get_report_data(self, json_data: dict) -> Dict[datetime.date, float]: report_data: Dict[datetime.date, float] = {} - data = json_data.get("data") + data = json_data.get("outcome").get("results") if not data: return report_data