import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
uproc: {
type: "app",
app: "uproc",
}
},
async run({steps, $}) {
const data = {
"processor": "get-string-normalized",
"params": {
"field": "address",
"text": "JMª Gº.Fco.gtez. Gro. C/urgell, 120"
}
}
return await axios($, {
method: "post",
url: `https://api.uproc.io/api/v2/process`,
headers: {
"content-type": `application/json`,
},
auth: {
username: `${this.uproc.$auth.email}`,
password: `${this.uproc.$auth.api_key}`,
},
data,
})
},
})
uProc uses API keys for authentication. When you connect your uProc account, Pipedream securely stores the keys so you can easily authenticate to uProc APIs in both code and no-code steps.