Fix plan-a-meal random recipe API queries

Mealie's orderBy=random requires a paginationSeed parameter, otherwise
the API returns 422. Added the seed to all random query examples.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Erich Blume 2026-03-17 11:10:48 -07:00
commit e5ce510fdc
2 changed files with 6 additions and 3 deletions

View file

@ -0,0 +1 @@
Fix plan-a-meal random recipe queries — add required `paginationSeed` parameter

View file

@ -47,16 +47,18 @@ Select one recipe from each tag category to build a balanced dinner:
Query by tag: Query by tag:
```fish ```fish
set SEED (date +%s)
# Get a random protein # Get a random protein
curl -sf "https://meals.ops.eblu.me/api/recipes?tags=protein&orderBy=random&perPage=1" \ curl -sf "https://meals.ops.eblu.me/api/recipes?tags=protein&orderBy=random&paginationSeed=$SEED&perPage=1" \
-H "Authorization: Bearer $MEALIE_TOKEN" -H "Authorization: Bearer $MEALIE_TOKEN"
# Get a random carb # Get a random carb
curl -sf "https://meals.ops.eblu.me/api/recipes?tags=carb&orderBy=random&perPage=1" \ curl -sf "https://meals.ops.eblu.me/api/recipes?tags=carb&orderBy=random&paginationSeed=$SEED&perPage=1" \
-H "Authorization: Bearer $MEALIE_TOKEN" -H "Authorization: Bearer $MEALIE_TOKEN"
# Get a random vegetable # Get a random vegetable
curl -sf "https://meals.ops.eblu.me/api/recipes?tags=vegetable&orderBy=random&perPage=1" \ curl -sf "https://meals.ops.eblu.me/api/recipes?tags=vegetable&orderBy=random&paginationSeed=$SEED&perPage=1" \
-H "Authorization: Bearer $MEALIE_TOKEN" -H "Authorization: Bearer $MEALIE_TOKEN"
``` ```