octohooks
TypeScript icon, indicating that this package has built-in type declarations

0.1.23 • Public • Published

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: 'foo.bar@example.com',
    },
  });
})();

/octohooks/

    Package Sidebar

    Install

    npm i octohooks

    Weekly Downloads

    0

    Version

    0.1.23

    License

    MIT

    Unpacked Size

    35.2 kB

    Total Files

    59

    Last publish

    Collaborators

    • octohooks