mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-12 19:25:16 +00:00
15 lines
405 B
JavaScript
Executable File
15 lines
405 B
JavaScript
Executable File
const { ThumbnailService } = require("m3o/thumbnail");
|
|
|
|
// Create a thumbnail screenshot by passing in a url, height and width
|
|
async function takeScreenshotOfAurl() {
|
|
let thumbnailService = new ThumbnailService(process.env.MICRO_API_TOKEN);
|
|
let rsp = await thumbnailService.screenshot({
|
|
height: 600,
|
|
url: "https://m3o.com",
|
|
width: 600,
|
|
});
|
|
console.log(rsp);
|
|
}
|
|
|
|
takeScreenshotOfAurl();
|