Recipe - Food - Nutrition

FREEMIUM
Verified
Door David | Bijgewerkt 4 days ago | Food
Populariteit

9.9 / 10

Latency

536ms

Serviceniveau

100%

Health Check

N/A

Terug naar alle discussies

API endpoints missing

Rapid account: Mouseltim
mouseltim
3 years ago

Hi
I am looking for below endpoints , and i believe I does not exist in rapid API

https://spoonacular.com/food-api/docs#Add-to-Meal-Plan
https://spoonacular.com/food-api/docs#Delete-from-Meal-Plan

Can someone please confirm ,if it really exists in Rapid API

Thanks

Rapid account: Mouseltim
mouseltim Commented 3 years ago

Any update on this @spoonacular ?

Rapid account: Mouseltim
mouseltim Commented 3 years ago

Hi
I am getting below error when try to add meal via rapid API

{
“message”: “Endpoint/mealplanner/api-89187-jan/items does not exist”
}

Here is the curl code for testing:

username = “api-89187-jan”;username=“api−89187−jan”;data = array(
“date”=> 1589500800,
“slot”=> 1,
“position”=> 0,
“type”=> “INGREDIENTS”,
“value”=> [
“ingredients”=> [
“name”=> “5 bananas”
]
]
);
$curl = curl_init();

curl_setopt_array(curl, [ CURLOPT_URL => “https://spoonacular-recipe-food-nutrition-v1.p.rapidapi.com/mealplanner/".curl,[CURLOPT​U​​RL=>“https://spoonacular−recipe−food−nutrition−v1.p.rapidapi.com/mealplanner/”.username."/items”,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_ENCODING => “”,
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => “POST”,
CURLOPT_POSTFIELDS => $data,
CURLOPT_HTTPHEADER => [
“content-type: application/x-www-form-urlencoded”,
“x-rapidapi-host: spoonacular-recipe-food-nutrition-v1.p.rapidapi.com”,
“x-rapidapi-key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx”
],
]);

response = curl_exec(response=curl​e​​xec(curl);
err = curl_error(err=curl​e​​rror(curl);

curl_close($curl);

if ($err) {
echo “cURL Error #:” . err; } else { echo "

".print_r(response,true);

}

Rapid account: Spoonacular
spoonacular Commented 3 years ago

Hi,

You can use any endpoint from our native API platform on RapidAPI if you adjust the request format accordingly.

I hope this helps!

Doe mee aan de discussie - voeg hieronder een opmerking toe

Log in / Schrij u in om nieuwe opmerkingen te plaatsen