Never spend time again to create awesome screenshots of your websites.
npm i @websiteshot/nodejs-client --save
import {
Config,
CreateRequest,
ScreenshotParameter,
Url,
WebsiteshotController,
} from '@websiteshot/nodejs-client'
const config: Config = {
projectId: '...',
apikey: '...',
}
const websiteshotController = new WebsiteshotController(config)
const screenshotParameter: ScreenshotParameter = {
width: 1200,
height: 720,
}
const urls: Url[] = [
{
url: 'https://websiteshot.app',
name: 'Websiteshot',
},
]
const createRequest: CreateRequest = {
screenshotParameter,
urls,
}
await websiteshotController.create(createRequest)
const createRequest: CreateRequest = {
templateId: '...',
}
await websiteshotController.create(createRequest)
const config: Config = {
projectId: '...',
apikey: '...',
}
const websiteshotController = new WebsiteshotController(config)
const response: GetResponse = await websiteshotController.get(jobId)