Skip to content

Added nutrition service endpoints for daily food, meals, and settings#323

Open
KopyWasTaken wants to merge 1 commit intocyberjunky:masterfrom
KopyWasTaken:master
Open

Added nutrition service endpoints for daily food, meals, and settings#323
KopyWasTaken wants to merge 1 commit intocyberjunky:masterfrom
KopyWasTaken:master

Conversation

@KopyWasTaken
Copy link

@KopyWasTaken KopyWasTaken commented Feb 6, 2026

Added endpoints for nutrition information for a specific date. This includes meals, food logs, and settings (basically a nutrition plan). I confirmed this worked on my local machine by pip installing my local version to a project I'm working on that uses this data.

Summary by CodeRabbit

  • New Features
    • Added nutrition data endpoints and retrieval methods to access daily food logs, meals, and settings by date.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 6, 2026

Walkthrough

demo.py removes an unnecessary lambda wrapper from the API call mapping for "remove_tokens", simplifying it to a direct function reference. garminconnect/init.py adds four new nutrition service endpoint attributes and three public methods to retrieve daily nutrition data (food logs, meals, settings) by date.

Changes

Cohort / File(s) Summary
API Call Mapping Refactoring
demo.py
Simplified "remove_tokens" entry by removing lambda wrapper; changed from lambda: remove_stored_tokens() to direct function reference remove_stored_tokens.
Nutrition Service Endpoints
garminconnect/__init__.py
Added four new nutrition endpoint attributes (garmin_nutrition, garmin_connect_nutrition_daily_food_logs, garmin_connect_nutrition_daily_meals, garmin_connect_nutrition_daily_settings) and three corresponding public methods (get_nutrition_daily_food_log(), get_nutrition_daily_meals(), get_nutrition_daily_settings()) to fetch daily nutrition data by date with standard validation and logging.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes in the pull request: adding three nutrition-related endpoints (food logs, meals, and settings) to the Garmin class.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

1 participant