yunkong2.pushover/README.md

46 lines
2.3 KiB
Markdown
Raw Normal View History

2018-09-22 00:10:53 +08:00
![Logo](admin/pushover.png)
2018-09-22 00:11:56 +08:00
# yunkong2 pushover Adapter
2018-09-22 00:10:53 +08:00
==============
2018-09-22 00:11:56 +08:00
[![NPM version](http://img.shields.io/npm/v/yunkong2.pushover.svg)](https://www.npmjs.com/package/yunkong2.pushover)
[![Downloads](https://img.shields.io/npm/dm/yunkong2.pushover.svg)](https://www.npmjs.com/package/yunkong2.pushover)
2018-09-22 00:10:53 +08:00
2018-09-22 00:11:56 +08:00
[![NPM](https://nodei.co/npm/yunkong2.pushover.png?downloads=true)](https://nodei.co/npm/yunkong2.pushover/)
2018-09-22 00:10:53 +08:00
2018-09-22 00:11:56 +08:00
Send pushover notifications from yunkong2.
2018-09-22 00:10:53 +08:00
## Usage
To send notification from ScriptEngine just write:
```javascript
// send notification to all instances of pushover adapter
sendTo("pushover", "message body");
// send notification to specific instance of pushover adapter
sendTo("pushover.1", "message body");
// To specify subject or other options
sendTo("pushover", {
message: 'Test text', // mandatory - your text message
title: 'SweetHome', // optional - your message's title, otherwise your app's name is used
sound: 'magic', // optional - the name of one of the sounds supported by device clients to override the user's default sound choice
// pushover, bike, bugle, cashregister, classical, cosmic, falling,
// gamelan, incoming, intermission, magic, mechanical, pianobar, siren,
// spacealarm, tugboat, alien, climb, persistent, echo, updown, none
priority: -1, // optional
// -1 to always send as a quiet notification,
// 1 to display as high-priority and bypass the user's quiet hours, or
// 2 to also require confirmation from the user
token: 'API/KEY token' // optional
// add other than configurated token to the call
url, // optional - a supplementary URL to show with your message
url_title, // optional - a title for your supplementary URL, otherwise just the URL is shown
device, // optional - your user's device name to send the message directly to that device, rather than all of the user's devices
timestamp // optional - a Unix timestamp of your message's date and time to display to the user, rather than the time your message is received by our API
});
```