https://github.com/js-kyle/firebase-webhook
Sends WebHooks based on realtime database updates
https://github.com/js-kyle/firebase-webhook
firebase real-time webhooks
Last synced: 3 months ago
JSON representation
Sends WebHooks based on realtime database updates
- Host: GitHub
- URL: https://github.com/js-kyle/firebase-webhook
- Owner: js-kyle
- Created: 2017-10-02T00:06:32.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2018-02-15T09:27:00.000Z (over 8 years ago)
- Last Synced: 2025-10-23T04:02:19.845Z (9 months ago)
- Topics: firebase, real-time, webhooks
- Language: JavaScript
- Size: 5.97 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# firebase-webhook
[](https://badge.fury.io/js/firebase-webhook)
firebase-webhook provides the ability to send WebHooks based on updates to a specified path in a Firebase Realtime Database.
### Installation
This module is installed via NPM:
```sh
$ npm install --save firebase-webhook
```
### Usage
Import the module:
```javascript
const fbwebhook = require('firebase-webhook');
```
Authenicate your app with Firebase using Firebase Admin Node.js SDK
Create a subscription:
```javascript
const webhookOpts = {
endpoint: 'https://requestb.in/abcdef',
headers: {"X-Hello" : "World"},
data: ['name', 'email']
}
fbwebhook.subscribe('users/', webhookOpts);
```
### API
##### Subscribe
Listen for updates to a specific path in Firebase.
``` javascript
fbwebhook.subscribe(path : String, options: Object);
```
##### Options
`endpoint {String}`
The webhook endpoint for this subscription.
`headers {Object}`
Key value pairs of custom http headers for the WebHook POST.
`data {Array}`
Specify which nodes of the updated child will be sent with the WebHook payload.
### Todos
- Test coverage
License
----
MIT
[//]: # (These are reference links used in the body of this note and get stripped out when the markdown processor does its job. There is no need to format nicely because it shouldn't be seen. Thanks SO - http://stackoverflow.com/questions/4823468/store-comments-in-markdown-syntax)
[dill]:
[git-repo-url]:
[john gruber]:
[df1]:
[markdown-it]:
[Ace Editor]:
[node.js]:
[Twitter Bootstrap]:
[jQuery]:
[@tjholowaychuk]:
[express]:
[AngularJS]:
[Gulp]:
[PlDb]:
[PlGh]:
[PlGd]:
[PlOd]:
[PlMe]:
[PlGa]: