Skip to content

Add get_categories, get_tags and get_tools organizer endpoints - #730

Closed
domodom30 wants to merge 5 commits into
joostlek:mainfrom
domodom30:dev
Closed

domodom30 wants to merge 5 commits into
joostlek:mainfrom
domodom30:dev

Conversation

@domodom30

@domodom30 domodom30 commented Jun 1, 2026 •

Copy link
Copy Markdown
Contributor

Proposed Changes

Extend the client with CRUD endpoints across recipes, mealplans, shopping lists, foods, units, and recipe favorites.

Recipe organizers (read-only)

  • get_categories(per_page) — GET /api/organizers/categories
  • get_tags(per_page) — GET /api/organizers/tags
  • get_tools(per_page) — GET /api/organizers/tools

Recipes

  • create_recipe(name) — POST /api/recipes
  • update_recipe(slug, MutateRecipe) — PUT /api/recipes/{slug}
  • delete_recipe(slug) — DELETE /api/recipes/{slug}

Mealplans

  • get_mealplan(mealplan_id) — GET /api/households/mealplans/{id}
  • update_mealplan(...) — PUT /api/households/mealplans/{id}
  • delete_mealplan(mealplan_id) — DELETE /api/households/mealplans/{id}

Shopping lists

  • get_shopping_list(list_id) — GET /api/households/shopping/lists/{id}
  • create_shopping_list(name) — POST /api/households/shopping/lists
  • update_shopping_list(list_id, name) — PUT /api/households/shopping/lists/{id}
  • delete_shopping_list(list_id) — DELETE /api/households/shopping/lists/{id}
  • add_recipe_to_shopping_list(list_id, recipe_id, scale) — POST /api/households/shopping/lists/{id}/recipe/{recipe_id}
  • remove_recipe_from_shopping_list(list_id, recipe_id, scale) — POST /api/households/shopping/lists/{id}/recipe/{recipe_id}/delete

Foods & Units

  • get_foods(per_page) — GET /api/foods
  • get_units(per_page) — GET /api/units

Recipe favorites & ratings

  • 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}

New models: Tool, CategoriesResponse, TagsResponse, ToolsResponse, FoodsResponse, UnitsResponse, RecipeRating, RecipeFavoritesResponse, MutateRecipe

Bug fixes:

  • Add missing group_id field to ShoppingList model
  • Fix RecipeFavoritesResponse — field renamed to ratings: list[RecipeRating] (endpoint returns rating objects, not recipe summaries)
  • Fix async property version → get_version() method
  • Fix Instruction.title field ordering (optional field moved after required fields)

Tests and Syrupy snapshots included for all new endpoints.

Related Issues

N/A

@joostlek joostlek left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the direction this is going. Mind splitting this up per category? That way it's a bit easier to review

Comment thread src/aiomealie/mealie.py Resolved
Comment thread src/aiomealie/mealie.py Resolved
Comment thread src/aiomealie/mealie.py Resolved
Comment thread src/aiomealie/mealie.py Resolved
Comment thread src/aiomealie/mealie.py Resolved
@domodom30 domodom30 changed the title Add CRUD operations for recipes, mealplans, shopping lists, organizers, foods, units and recipe favorites Add get_categories, get_tags and get_tools organizer endpoints Jun 2, 2026
domodom30 added 4 commits June 3, 2026 12:28
…ts and favorites

- Add create/update/delete recipe endpoints with typed MutateRecipe model
- Add get/update/delete mealplan endpoints
- Add get/create/update/delete shopping list endpoints
- Add add/remove recipe to shopping list endpoints
- Add get foods and get units endpoints
- Add get/add/remove recipe favorites endpoints
- Add rate_recipe endpoint
- Add FoodsResponse, UnitsResponse, RecipeFavoritesResponse, MutateRecipe models
- Add group_id field to ShoppingList model
- Fix async property version -> get_version() method
- Fix module docstring
- Export new public types from __init__.py
The favorites endpoint returns ratings objects, not recipe summaries.
RecipeFavoritesResponse.ratings now uses list[RecipeRating] instead of list[BaseRecipe].
The field is not always present in the API response.
@domodom30

Copy link
Copy Markdown
Contributor Author

Closing in favour of 5 focused PRs as requested:

@domodom30 domodom30 closed this Jun 4, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 8, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants