with Poper and Formatting?
Emit new event when a new lead is obtained from Poper popups.
Get the duration between two dates in days, hours, minutes, and seconds along with checking if they are the same.
Format a date string to another date string. For more examples on formatting, see the Sugar Date Format documentation.
import { axios } from "@pipedream/platform"
export default defineComponent({
  props: {
    poper: {
      type: "app",
      app: "poper",
    }
  },
  async run({steps, $}) {
    const data = {
      "api_key": `${this.poper.$auth.api_key}`,
    }
    return await axios($, {
      method: "post",
      url: `https://api.poper.ai/general/v1/ping`,
      headers: {
        "Content-Type": `application/x-www-form-urlencoded`,
      },
      data,
    })
  },
})
export default defineComponent({
  async run({ steps, $ }) {
    const text = ' Hello world! ';
    return text.trim()
  },
})