Recipe - Food - Nutrition

פרמיום
Verified
על ידי David | מְעוּדכָּן 7 giorni fa | Food
פּוֹפּוּלָרִיוּת

9.9 / 10

חֶבִיוֹן

491ms

רמת שירות

100%

Health Check

N/A

חזרה לכל הדיונים

Generate Meal plan issue

Rapid account: Seneca X
SenecaX
un anno fa

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 un anno fa

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

הצטרף לדיון - הוסף תגובה למטה:

התחבר / הירשם כדי לפרסם תגובות חדשות