项目作者: mrTomatolegit

项目描述 :
Patreon webhooks handler with caching and IntelliSense support
高级语言: JavaScript
项目地址: git://github.com/mrTomatolegit/patreon-webhooks.git
创建时间: 2021-06-10T05:50:31Z
项目社区:https://github.com/mrTomatolegit/patreon-webhooks

开源协议:MIT License

下载


Patreon Webhooks

A patreon webhook handler and cache manager

Installation

  1. npm i patreon-webhooks

Example Usage

  1. const WEBHOOK_SECRET = 'insert webhook secret here';
  2. const { Hub } = require('patreon-webhooks');
  3. const hub = new Hub();
  4. const express = require('express');
  5. const app = express();
  6. app.use('/webhooks/patreon', hub.webhooks(WEBHOOK_SECRET));
  7. hub.on('memberCreate', member => console.log(member.id));
  8. app.listen(80);

License

This NPM module is under the MIT License\
Please refer yourself to the LICENSE file