octohooks
v0.1.23
Published
Octohooks makes sending webhooks easy and reliable by offering webhook sending as a service.
Downloads
30
Readme
Octohooks (Node.js)
Getting Started
Installation
Install the package with:
npm install octohooks
# or
yarn add octohooks
Usage
import { Octohooks } from 'octohooks';
const octohooks = new Octohooks('AUTH_TOKEN');
(async () => {
const application = await octohooks.application.create({
name: 'My Application',
uid: 'my-application',
});
const endpoint = await octohooks.endpoint.create(application.id, {
channels: [],
enabled: true,
eventTypes: ['user.created'],
headers: {},
name: 'My Endpoint',
uid: 'my-endpoint',
url: 'https://....',
});
const message = await octohooks.message.create(application.id, {
channels: [],
eventType: 'user.created',
payload: {
email: '[email protected]',
},
});
})();