with screenshot.fyi and Aryn?
Takes a screenshot of a webpage using Screenshot.fyi. See the documentation
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
screenshot_fyi: {
type: "app",
app: "screenshot_fyi",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://screenshot.fyi/api/take`,
params: {
url: `https://pipedream.com`,
accessKey: `${this.screenshot_fyi.$auth.access_key}`,
},
})
},
})
import { axios } from "@pipedream/platform";
import FormData from "form-data";
import request from "request";
export default defineComponent({
props: {
aryn: {
type: "app",
app: "aryn",
}
},
async run({steps, $}) {
const data = new FormData();
data.append("pdf", request("https://www.learningcontainer.com/wp-content/uploads/2019/09/sample-pdf-file.pdf"));
return await axios($,{
method: "POST",
url: `https://api.aryn.cloud/v1/document/partition`,
headers: {
"Content-Type": `multipart/form-data`,
Authorization: `Bearer ${this.aryn.$auth.api_key}`,
},
data
});
},
})