npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

webmerge

v1.0.2

Published

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

Downloads

10

Readme

npm version Build Status Coverage Status dependencies Status devDependencies Status

WebMerge

NodeJS wrapper library for using WebMerge API.

Install

$ npm install webmerge --save

or with yarn...

$ yarn add webmerge

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.

new WebMergeAPI(key, secret, [PromiseImplementation])

Create an API client that uses Promises. Optionally, you may specify which Promise implementation to use (e.g. bluebird). Defaults to using Native Promises.

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