1.0.0 • Published 4 years ago

@hyperlink/pushover v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

Pushover Client

A simple lightweight client for Pushover notifications.

Installation

npm install @hyperlink/pushover

Usage

import { Pushover } from '@hyperlink/pushover';

async function sendMessage() {
  const pushover = new Pushover('<YOUR TOKEN>', '<USER TOKEN>');
  await pushover.sendMessage({
    message: 'Test message',
    title: 'Test title',
  });
}

sendMessage();

Message Format

interface PushoverMessage {
    message: string;
    title?: string;
    sound?: string;
    device?: string;
    priority?: number;
    url?: string;
    url_title?: string;
    attachment?: string; // path to the file
    timestamp?: string;
}