Habitica is a free habit and productivity app that treats your real life like a game. Habitica can help you achieve your goals to become healthy and happy.
Write custom Node.js code and use any of the 400k+ npm packages available. Refer to the Pipedream Node docs to learn more.
The Habitica API lets you gamify your life by interacting programmatically with your habits, dailies, to-dos, and rewards on the Habitica platform. This API offers endpoints for creating, fetching, updating, and deleting tasks, as well as retrieving user information and stats. When paired with Pipedream's serverless platform, the Habitica API becomes even more powerful, enabling customized, automated workflows that can respond to events in other apps or scheduled triggers to enhance your productivity and maintain your focus.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
habitica: {
type: "app",
app: "habitica",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://habitica.com/api/v3/user`,
headers: {
"x-client": `3a326108-1895-4c23-874e-37668c75f2ad-Pipedream`,
"x-api-user": `${this.habitica.$auth.user_id}`,
"x-api-key": `${this.habitica.$auth.api_token}`,
},
})
},
})
Develop, run and deploy your Node.js code in Pipedream workflows, using it between no-code steps, with connected accounts, or integrate Data Stores and File Stores.
This includes installing NPM packages, within your code without having to manage a package.json
file or running npm install
.
Below is an example of installing the axios
package in a Pipedream Node.js code step. Pipedream imports the axios
package, performs the API request, and shares the response with subsequent workflow steps:
// 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
},
})