webhookify-plugin

1.0.0 • Public • Published

webhookify-plugin

This module contains an abstract class, which webhookify plugins should extend to be compatible with the webhookify client. More information about developing your own plugins for the webhookify client can be found on the wiki.

Example

const { Plugin } = require('webhookify-plugin');
 
class MyAwesomePlugin extends Plugin {
    constuctor(config) {
        // plugin name is set in the constructor of the base Plugin class
        super("myawesomeplugin", config);
 
        // the config can be accessed in this.config
    }
 
    handlePush(payload) {
        // do something with the payload here
    }
 
    handleFetch(payload, reply) {
        // do something with the payload, then call reply(response) within 5 seconds
    }
 
    // you can add additional methods and variables
}

Dependents (3)

Package Sidebar

Install

npm i webhookify-plugin

Weekly Downloads

0

Version

1.0.0

License

ISC

Unpacked Size

2.21 kB

Total Files

3

Last publish

Collaborators

  • jangxx