@hyperlink/pushover
Version:
Pushover.net client written in TypeScript
42 lines (32 loc) • 703 B
Markdown
A simple lightweight client for Pushover notifications.
```bash
npm install @hyperlink/pushover
```
```typescript
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();
```
```typeScript
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;
}
```