Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

webmerge

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

webmerge

Library for accessing WebMerge (https://webmerge.me/) API

  • 0.1.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

npm version Build Status Coverage Status dependencies Status devDependencies Status

WebMerge

NodeJS library for using WebMerge API.

Install

$ npm install webmerge --save

Authentication

In order to use WebMerge's API, you need to obtain an API key and secret from this page.

Documentation (auto-generated from JSDoc)

https://dashmug.github.io/webmerge-node/index.html (work-in-progress)

Usage Examples

Callback version

const WebMergeAPI = require('webmerge').WebMergeAPI

const api = new WebMergeAPI(API_KEY, SECRET)

// Retrieve a specific document
api.getDocument(123456, (error, result) => console.log(result))

Promise version

Using native Promise,

const WebMergePromiseAPI = require('webmerge').WebMergePromiseAPI

const api = new WebMergePromiseAPI(API_KEY, SECRET)

// Retrieve a specific document
api.getDocument(123456).then(console.log)

Using Bluebird,

const Promise = require('bluebird')
const WebMergePromiseAPI = require('webmerge').WebMergePromiseAPI

const api = new WebMergePromiseAPI(API_KEY, SECRET, Promise)

// Retrieve a specific document
api.getDocument(123456).then(console.log)

List of methods

See documentation for more information.

new WebMergeAPI(key, secret)

Create an API client that uses callbacks.

Documents

WebMerge REST API Reference: https://www.webmerge.me/developers/documents

mergeDocument(id, key, data, isTestMode, downloadFile, callback)

Merge a document.

createDocument(data, callback)

Create a new document. Depending on the type of document you are creating, different parameters are required

updateDocument(id, data, callback)

Update a document. You cannot change the type of document, but you can change many of the other settings as well as change the contents of the document. Only parameters that are sent in the request will be updated.

getDocuments(options, callback)

Retrieve a list of documents.

getDocument(id, callback)

Retrieve a specific document.

getDocumentFields(id, callback)

Retrieve a list of fields for a specific document.

getDocumentFiles(id, callback)

Retrieve the file that was uploaded for a specific document (pdf, docx, xlsx, or pptx).

copyDocument(id, data, callback)

Create a copy of a document.

deleteDocument(id, callback)

Delete a document.

Data Routes

WebMerge REST API Reference: https://www.webmerge.me/developers/routes

mergeDataRoute(id, key, data, isTestMode, downloadFile, callback)

Merge a data route.

createDataRoute(data, callback)

Create a new data route.

updateDataRoute(id, data, callback)

Update a data route.

getDataRoutes(callback)

Retrieve a list of data routes.

getDataRoute(id, callback)

Retrieve a specific data route.

getDataRouteFields(id, callback)

Retrieve a list of fields for a specific data route. This includes fields from all documents in routing rules.

getDataRouteRules(id, callback)

Retrieve a list of rules for a specific data route.

deleteDataRoute(id, callback)

Delete a data route.

Tools

WebMerge REST API Reference: https://www.webmerge.me/developers/tools

combineFiles(data, callback)

Combine multiple files (pages) into a single file.

convertToPDF(data, callback)

Convert file to PDF

License

MIT © Noel Martin Llevares

Keywords

FAQs

Package last updated on 21 May 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc