Node Library for Capture by Techulus
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
test
.gitignore
.travis.yml
LICENSE
README.md
index.js
package-lock.json
package.json

README.md

Capture Node SDK

Node Library for Capture by Techulus

Build Status

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

var Capture = require('capture-node');
var capture = Capture(YOUR_API_KEY, YOUR_API_SECRET);

// var url = capture.buildImageUrl(URL_TO_CAPTURE, CAPTURE_OPTIONS);

var 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!

PDF

var Capture = require('capture-node');
var capture = Capture(YOUR_API_KEY, YOUR_API_SECRET);

// var url = capture.buildPdfUrl(URL_TO_CAPTURE, CAPTURE_OPTIONS);

var url = capture.buildPdfUrl('https://capture.techulus.in/', {
    full: true,
    delay: 3,
    t: Date.now()
});

Now open the url to see the PDF!