capture-node
Advanced tools
Comparing version 1.1.0 to 2.0.0
{ | ||
"name": "capture-node", | ||
"version": "1.1.0", | ||
"version": "2.0.0", | ||
"description": "Node Library for Capture by Techulus", | ||
"main": "index.js", | ||
"main": "dist/index.js", | ||
"types": "dist/index.d.ts", | ||
"scripts": { | ||
"test": "mocha" | ||
"pretest": "tsc", | ||
"test": "jest", | ||
"build": "tsc", | ||
"prepublish": "tsc" | ||
}, | ||
@@ -29,4 +33,12 @@ "repository": { | ||
"devDependencies": { | ||
"chai": "^4.1.2" | ||
"@babel/preset-env": "^7.22.5", | ||
"@babel/preset-typescript": "^7.22.5", | ||
"@types/jest": "^29.5.2", | ||
"@types/md5": "^2.3.2", | ||
"@types/node": "^20.3.1", | ||
"@types/qs": "^6.9.7", | ||
"jest": "^29.5.0", | ||
"prettier": "^2.8.8", | ||
"typescript": "^5.1.3" | ||
} | ||
} |
# Capture Node SDK | ||
Node Library for Capture by Techulus | ||
[![Build Status](https://travis-ci.org/techulus/capture-node.svg?branch=master)](https://travis-ci.org/techulus/capture-node) | ||
Get your API Key and Secret from https://capture.techulus.in/console | ||
@@ -21,8 +19,8 @@ | ||
```javascript | ||
var Capture = require('capture-node'); | ||
var capture = Capture(YOUR_API_KEY, YOUR_API_SECRET); | ||
import Capture from 'capture-node'; | ||
const capture = new Capture(YOUR_API_KEY, YOUR_API_SECRET); | ||
// var url = capture.buildImageUrl(URL_TO_CAPTURE, CAPTURE_OPTIONS); | ||
var url = capture.buildImageUrl('https://capture.techulus.in/', { | ||
const url = capture.buildImageUrl('https://capture.techulus.in/', { | ||
full: true, | ||
@@ -38,8 +36,8 @@ delay: 3, | ||
```javascript | ||
var Capture = require('capture-node'); | ||
var capture = Capture(YOUR_API_KEY, YOUR_API_SECRET); | ||
import Capture from 'capture-node'; | ||
const capture = new Capture(YOUR_API_KEY, YOUR_API_SECRET); | ||
// var url = capture.buildPdfUrl(URL_TO_CAPTURE, CAPTURE_OPTIONS); | ||
var url = capture.buildPdfUrl('https://capture.techulus.in/', { | ||
const url = capture.buildPdfUrl('https://capture.techulus.in/', { | ||
full: true, | ||
@@ -50,2 +48,23 @@ delay: 3, | ||
``` | ||
Now open the url to see the PDF! | ||
### Content | ||
```javascript | ||
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 | ||
```javascript | ||
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/'); | ||
``` |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
9523
179
67
9
1