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:
parent
6d7597670e
commit
e5ce510fdc
2 changed files with 6 additions and 3 deletions
1
docs/changelog.d/+fix-plan-a-meal-random-query.bugfix.md
Normal file
1
docs/changelog.d/+fix-plan-a-meal-random-query.bugfix.md
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
Fix plan-a-meal random recipe queries — add required `paginationSeed` parameter
|
||||||
|
|
@ -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"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue