import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
mainwp: {
type: "app",
app: "mainwp",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://${this.mainwp.$auth.url}/wp-json/mainwp/v1/updates/available-updates`,
params: {
consumer_key: `${this.mainwp.$auth.customer_key}`,
consumer_secret: `${this.mainwp.$auth.customer_secret}`,
},
})
},
})
MainWP uses API keys for authentication. When you connect your MainWP account, Pipedream securely stores the keys so you can easily authenticate to MainWP APIs in both code and no-code steps.
To retrieve your API keys,
The url field below is your WordPress site's domain where MainWP is installed.
For example, if you have a Wordpress.org site hosted at https://example.com
, then enter example.com
in the url field below.