mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-18 05:35:10 +00:00
Generate clients (#206)
This commit is contained in:
16
examples/thumbnail/screenshot/node/takeScreenshotOfAUrl.js
Executable file
16
examples/thumbnail/screenshot/node/takeScreenshotOfAUrl.js
Executable file
@@ -0,0 +1,16 @@
|
||||
import * as thumbnail from "m3o/thumbnail";
|
||||
|
||||
// Create a thumbnail screenshot by passing in a url, height and width
|
||||
async function TakeScreenshotOfAurl() {
|
||||
let thumbnailService = new thumbnail.ThumbnailService(
|
||||
process.env.MICRO_API_TOKEN
|
||||
);
|
||||
let rsp = await thumbnailService.screenshot({
|
||||
height: 600,
|
||||
url: "https://m3o.com",
|
||||
width: 600,
|
||||
});
|
||||
console.log(rsp);
|
||||
}
|
||||
|
||||
await TakeScreenshotOfAurl();
|
||||
Reference in New Issue
Block a user