8000 GitHub - jadaradix/hooks: Wrapper for http://hooks.events/
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

jadaradix/hooks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hooks

Wrapper for http://hooks.events/

Install

npm install jadaradix/hooks --save

And then require it like this:

const hooks = require("hooks");

Easy!

If you want it store it locally (e.g. via git clone), require it like this:

const hooks = require("./hooks");

Try now

An example, example.js is included to get you going. All you need to do is fill in your API key. Run it like this:

node example.js

This example includes ./index.js which contains the code.

Use

The module exposes just one method, hook. It takes some options and an optional callback function, which returns the standard node.js err, response arguments. It's as easy as this:

hooks.hook(
  {
    "apiKey": "...",
    "title": "Example Hook Ti
50BE
tle",
    "message": "Example Hook Message"
  },
  (err, response) => {
    if (err) {
      return console.log("Failure (%s)", err);
    }
    return console.log("Success (%s)", response);
  }
);

Be sure to fill in your API key.

Releases

No releases published

Packages

No packages published
0