ScreenshotApi-Js is a simple, promise based Node.js library for making screenshot requests with www.screenshotapi.io.
Installation
npm install screenshotapi --save
Usage
// get a free API key at www.screenshotapi.ioconst API_KEY = 'your api key goes here'; var ScreenshotApi = ; var captureRequest = url: 'http://www.amazon.com' webdriver: 'firefox' viewport: '1280x1024' fullpage: false javascript: true; ScreenshotApi
Or if rather than download the screenshot to a local file you prefer to retrieve the URL where your screenshot capture is hosted, use the below function. Note that the S3 URL will only last for 72 hours, after which it will be automatically removed, so you will need to download it for permanent storage.
ScreenshotApi
Debug output is disabled by default. To enable debug output to see status while screenshot requests are progressing, use:
ScreenshotApi;
License
MIT