Skip to content

Add recipe favorites and ratings endpoints - #738

Merged
joostlek merged 1 commit into
joostlek:mainfrom
domodom30:feature/favorites-ratings
Jun 22, 2026
Merged

joostlek merged 1 commit into
joostlek:mainfrom
domodom30:feature/favorites-ratings

Conversation

@domodom30

Copy link
Copy Markdown
Contributor

Proposed Changes

Add endpoints to manage recipe favorites and ratings for the current user.

  • get_recipe_favorites() — GET /api/users/self/favorites
  • add_recipe_favorite(recipe_slug) — POST /api/users/{id}/favorites/{slug}
  • remove_recipe_favorite(recipe_slug) — DELETE /api/users/{id}/favorites/{slug}
  • rate_recipe(recipe_slug, *, rating, is_favorite) — POST /api/users/{id}/ratings/{slug}

The user ID is fetched once from GET /api/users/self and cached on the client instance to avoid repeated round-trips.

New models: RecipeRating, RecipeFavoritesResponse

Tests included for all new endpoints.

Related Issues

Splits out the favorites/ratings part of #730.

Adds RecipeRating and RecipeFavoritesResponse models and exposes
get_recipe_favorites, add_recipe_favorite, remove_recipe_favorite
and rate_recipe on MealieClient.
@domodom30
domodom30 force-pushed the feature/favorites-ratings branch from 0ff73d3 to fe2fe22 Compare June 4, 2026 11:44
@joostlek
joostlek merged commit f1038d9 into joostlek:main Jun 22, 2026
12 checks passed
domodom30 added a commit to domodom30/python-mealie that referenced this pull request Jun 22, 2026
Resolve add/add conflicts in tests/test_mealie.py and
tests/__snapshots__/test_mealie.ambr by keeping both the shopping-list
CRUD tests and the favorites/ratings tests (joostlek#738).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
domodom30 added a commit to domodom30/python-mealie that referenced this pull request Jun 22, 2026
Resolve add/add conflicts in tests/test_mealie.py and
tests/__snapshots__/test_mealie.ambr by keeping both the shopping-list
CRUD tests and the favorites/ratings tests (joostlek#738).
domodom30 added a commit to domodom30/python-mealie that referenced this pull request Jun 22, 2026
Resolve conflicts in tests by keeping both the mealplan CRUD tests and
the favorites/ratings tests (joostlek#738), and drop the duplicate _get_user_id
helper now provided by main.
domodom30 added a commit to domodom30/python-mealie that referenced this pull request Jun 22, 2026
Resolve conflicts in models.py and tests by keeping both the organizers
models/tests (categories, tags, tools, foods, units) and the
favorites/ratings additions from main (joostlek#738).
domodom30 added a commit to domodom30/python-mealie that referenced this pull request Jun 22, 2026
Resolve conflicts in tests by keeping both the mealplan CRUD tests and
the shopping-list/favorites tests now present in main (joostlek#737, joostlek#738).
domodom30 added a commit to domodom30/python-mealie that referenced this pull request Jun 22, 2026
Resolve conflicts in tests by keeping both the organizers tests
(categories, tags, tools, foods, units) and the shopping-list/favorites
tests now present in main (joostlek#737, joostlek#738).
domodom30 added a commit to domodom30/python-mealie that referenced this pull request Jun 22, 2026
Resolve conflicts in tests by keeping both the organizers tests and the
mealplan tests now merged into main (joostlek#736), alongside the shopping-list
and favorites tests (joostlek#737, joostlek#738).
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 23, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

new-feature New features or options.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants