capture-node
v2.0.1
Published
Node Library for Capture by Techulus
Downloads
17
Readme
Capture Node SDK
Node Library for Capture by Techulus
Get your API Key and Secret from https://capture.techulus.in/console
Installation
npm install capture-node
Usage
List of all capture options: https://docs.capture.techulus.in
Image
import { Capture } from 'capture-node';
const capture = new Capture(YOUR_API_KEY, YOUR_API_SECRET);
// var url = capture.buildImageUrl(URL_TO_CAPTURE, CAPTURE_OPTIONS);
const url = capture.buildImageUrl('https://capture.techulus.in/', {
full: true,
delay: 3,
t: Date.now()
});
Now stick that url in an img tag to render the screenshot!
import { Capture } from 'capture-node';
const capture = new Capture(YOUR_API_KEY, YOUR_API_SECRET);
// var url = capture.buildPdfUrl(URL_TO_CAPTURE, CAPTURE_OPTIONS);
const url = capture.buildPdfUrl('https://capture.techulus.in/', {
full: true,
delay: 3,
t: Date.now()
});
Content
import { Capture } from 'capture-node';
const capture = new Capture(YOUR_API_KEY, YOUR_API_SECRET);
// var url = capture.buildContentUrl(URL_TO_CAPTURE, CAPTURE_OPTIONS);
const url = capture.buildContentUrl('https://capture.techulus.in/');
Metadata
import { Capture } from 'capture-node';
const capture = new Capture(YOUR_API_KEY, YOUR_API_SECRET);
// var url = capture.buildMetadataUrl(URL_TO_CAPTURE, CAPTURE_OPTIONS);
const url = capture.buildMetadataUrl('https://capture.techulus.in/');