Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
#code so we can visualise the nutrient information of a recipe using the spoonacular api documentation
import discord
from discord.ext import commands
client.run = ('NjM1NDY4MDIwNzM4OTQ5MTIw.XaxfwA.Pb6TxUeIHEhvAaiC7_M5VbecIH8')
var unirest = require("unirest");
var req = unirest("POST", "https://spoonacular-recipe-food-nutrition-v1.p.rapidapi.com/recipes/visualizeNutrition");
req.headers({
"x-rapidapi-host": "spoonacular-recipe-food-nutrition-v1.p.rapidapi.com",
"x-rapidapi-key": "SIGN-UP-FOR-KEY",
"accept": "text/html",
"content-type": "application/x-www-form-urlencoded"
});
req.form({
"ingredientList": "3 oz flour",
"servings": "2"
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});