-
-
Save Dan-Q/711ab041c0c8bdcac7c07d5c641c0fdd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const webHook = '[HUGINN WEBHOOK URL]'; | |
const buttonManager = require('buttons') | |
const http = require('http'); | |
buttonManager.on('buttonSingleOrDoubleClickOrHold', function(obj){ | |
http.makeRequest({ | |
url: webHook, | |
method: 'POST', | |
headers: {'Content-Type': 'application/json'}, | |
content: JSON.stringify(obj), | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment