Skip to content

Add get_categories, get_tags, get_tools, get_foods and get_units endpoints - #734

Merged
joostlek merged 6 commits into
joostlek:mainfrom
domodom30:feature/organizers
Jul 27, 2026
Merged

joostlek merged 6 commits into
joostlek:mainfrom
domodom30:feature/organizers

Conversation

@domodom30

Copy link
Copy Markdown
Contributor

Proposed Changes

Add read-only list endpoints for recipe organizers, foods and units.

Organizers

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

Foods & Units

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

per_page=-1 is Mealie's convention for "return all results in a single page".

New models: Tool, CategoriesResponse, TagsResponse, ToolsResponse, FoodsResponse, UnitsResponse

Bug fixes included:

  • Fix Instruction.title field ordering — optional field moved after required fields
  • Rename async version property to get_version() method (a property cannot be awaited)

Tests and Syrupy snapshots included for all new endpoints.

Related Issues

Splits out the organizers + foods/units part of #730.

…oints

Also fix Instruction.title field ordering (move optional field after required
fields) and rename async version property to get_version() method.
@domodom30
domodom30 force-pushed the feature/organizers branch from ddefe5d to 7a586fd Compare June 4, 2026 11:53
@domodom30
domodom30 force-pushed the feature/organizers branch from 5d86861 to 1f46e38 Compare June 18, 2026 15:06
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).
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).
Comment thread src/aiomealie/mealie.py Resolved
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).
@domodom30

Copy link
Copy Markdown
Contributor Author

Rebased onto the latest main to resolve the merge conflicts.

The conflicts in tests/test_mealie.py and tests/snapshots/test_mealie.ambr were purely additive: this branch and the recently merged PRs (#736, #737, #738) all append tests/snapshots to the
same files. I merged main in and kept both sides — the organizer tests from this PR plus the mealplan/shopping-list/favorites tests already on main. Snapshot entries are back in alphabetical
order, so --snapshot-update is a no-op.

All tests pass locally (uv run pytest) and the branch is mergeable again.


Out of scope for this PR; can be revisited separately.
@github-actions

Copy link
Copy Markdown

There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. Thank you for your contributions.

@github-actions github-actions Bot added the stale There has not been activity on this issue or PR for quite some time. label Jul 23, 2026

@andrew-codechimp andrew-codechimp left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good to me, any reason not to merge?
I have a new FR that has a dependency on the tool model

@andrew-codechimp andrew-codechimp removed the stale There has not been activity on this issue or PR for quite some time. label Jul 26, 2026
@joostlek
joostlek merged commit 20d1826 into joostlek:main Jul 27, 2026
13 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 28, 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.

3 participants