Recipe - Food - Nutrition

FREEMIUM
Verified
Por David | Atualizado 8 days ago | Food
Popularidade

9.9 / 10

Latência

488ms

Nível de serviço

100%

Health Check

N/A

Voltar para todas as discussões

Generate Meal plan issue

Rapid account: Seneca X
SenecaX
a year ago

Is it normal that the Generate Meal Plan API returns a collection like this:
items:0:
day:1
mealPlanId:0
slot:1
position:0
type:“RECIPE"
value:”{“id”:657178,“imageType”:“jpg”,“title”:“Protein Packed Carrot Muffins”}"

when the examples return it like that:
0:
id:49993
title:"Cream Cheese Banana Nut Bread"
readyInMinutes:90
image:"cream-cheese-banana-nut-bread-2-49993.jpg"
imageUrls:
0:"cream-cheese-banana-nut-bread-2-49993.jpg"
1:“cream_cheese_banana_nut_bread-49993.jpg”

The one that I ran gives me an object value
The one in the example give me another format

I get source_url when generating for 1 day
but i get value:"{“id”:657178,“imageType”:“jpg”,“title”:“Protein Packed Carrot Muffins”}" when generating for 1 week

And also, regarding the API Add Meal Plan Template returns me an error 500 when I try to put the response in the body to add to a user, any reasons why? or how should it be formatted?

Rapid account: Spoonacular
spoonacular Commented a year ago

I am afraid I do not follow. Could you please send which request URL you are trying, which response you receive, and what you expect to receive? Be sure to replace your API key with a placeholder.

Perhaps this will help too: https://spoonacular.com/food-api/docs#Working-with-the-Meal-Planner

Junte-se à discussão - adicione o comentário abaixo:

Efetue login / inscreva-se para postar novos comentários