The Humor API allows you to access over 50,000 jokes and over 100,000 memes.
Write custom Node.js code and use any of the 400k+ npm packages available. Refer to the Pipedream Node docs to learn more.
Rate a joke or a meme with your upvote or downvote. See the docs here.
Searches for jokes based on user-defined criteria. See the docs here.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
humor_api: {
type: "app",
app: "humor_api",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://api.humorapi.com/memes/search`,
headers: {
"Content-Type": `application/json`,
},
params: {
keywords: `{your_keywords}`,
"api-key": `${this.humor_api.$auth.api_key}`,
},
})
},
})
// To use previous step data, pass the `steps` object to the run() function
export default defineComponent({
async run({ steps, $ }) {
// Return data to use it in future steps
return steps.trigger.event
},
})