with Brave Search API and Matrix?
Query Brave Search and get back search results from the web. See the documentation
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`,
},
})
},
})
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
matrix: {
type: "app",
app: "matrix",
}
},
async run({steps, $}) {
return await axios($, {
url: `${this.matrix.$auth.homeserver}/_matrix/client/v3/profile/${this.matrix.$auth.user_id}`,
headers: {
Authorization: `Bearer ${this.matrix.$auth.access_token}`,
},
})
},
})