with Spoonacular and Instant?
The Spoonacular API is a robust culinary interface that can enhance apps with food and nutrition data. With rich endpoints for recipes, ingredients, and meal planning, developers can automate content creation, manage diet tracking, or enrich e-commerce platforms. Pipedream's serverless platform empowers you to create custom Spoonacular workflows, linking with other APIs and services to streamline tasks, like auto-generating shopping lists or scheduling weekly meal plans based on dietary preferences.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
spoonacular: {
type: "app",
app: "spoonacular",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://api.spoonacular.com/recipes/complexSearch`,
headers: {
"Content-Type": `application/json`,
"x-api-key": `${this.spoonacular.$auth.api_key}`,
},
params: {
query: `{your_query}`,
},
})
},
})
import { init, id } from '@instantdb/admin';
export default defineComponent({
props: {
instant: {
type: "app",
app: "instant",
}
},
async run({steps, $}) {
const db = init({
appId: this.instant.$auth.app_id,
adminToken: this.instant.$auth.admin_token,
});
return await db.query({ _: {} });
},
})