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
|
|
@ -47,16 +47,18 @@ Select one recipe from each tag category to build a balanced dinner:
|
|||
Query by tag:
|
||||
|
||||
```fish
|
||||
set SEED (date +%s)
|
||||
|
||||
# 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"
|
||||
|
||||
# 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"
|
||||
|
||||
# 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"
|
||||
```
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue