with Notiff (API Key) and Brave Search API?
Send a new notification to a user or system via notiff.io. See the documentation
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
notiff: {
type: "app",
app: "notiff",
}
},
async run({steps, $}) {
const data = {
"id_notification_source": `${this.notiff.$auth.notification_source_id}`,
"title": `New Notification`,
"description": `Notification from Pipedream`,
"url": `https://pipedream.com`,
}
return await axios($, {
method: "post",
url: `https://notiff.io/api/1.1/wf/create_notification`,
headers: {
"content-type": `application/json`,
},
data,
})
},
})
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
brave_search_api: {
type: "app",
app: "brave_search_api",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://api.search.brave.com/res/v1/web/search`,
headers: {
"x-subscription-token": `${this.brave_search_api.$auth.api_key}`,
"accept": `application/json`,
"accept-encoding": `gzip`,
},
params: {
"q": `pipedream`,
},
})
},
})