This repository has been archived by the owner on Feb 28, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpushoverNotification.json
24 lines (24 loc) · 1.82 KB
/
pushoverNotification.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
{
"name": "pushoverNotification",
"version": "1.0.5",
"type": "actuator",
"script": "const axios = require('axios')\n\nconst token = options.requiredProperties.token\nconst user = options.requiredProperties.user\nconst message = options.requiredProperties.message\nconst title = options.requiredProperties.title\n\nif (!token || !user || !message || !title) {\n send(new Error('Missing property'))\n} else {\n axios.post(\n 'https://api.pushover.net/1/messages.json',\n { token, user, message: options.requiredProperties.message, title }\n ).then((response) => {\n send(null, { rawData : {response}\n })\n }).catch((error) => {\n send(new Error('Calling pushover failed: ' + error))\n })\n}",
"metadata": {
"author": "",
"category": "",
"description": "<h4>pushoverNotification Actuator</h4>\n<br>\nSends a ntification using the pushover service\n<br>\n<br>\n<b>Properties</b>\n<ul>\n <li>\n token: Pushover api token (we do not recommend to fill in the token as plaintext, use <a href=\"https://docs.waylay.io/plugins/sensors-and-actuators/#properties-declarative-binding\" target=\"_blank\">declerative binding</a> in combination with <a href=\"https://docs.waylay.io/features/rules/vault/\" target=\"_blank\">vault</a>)\n </li>\n <li>\n user: The usergroup that will receive the notification\n </li>\n <li>\n message: Message that will be added to the notification\n </li>\n <li>\n title: Title of the notification\n </li>\n</ul>",
"documentationURL": "https://pushover.net/api#messages",
"iconURL": "https://static.waylay.io/plugs/icons/pushover.png",
"supportedStates": [],
"requiredProperties": [
"token",
"user",
"message",
"title"
],
"requiredRawData": []
},
"dependencies": {
"axios": "^0.20.0"
}
}