pushover-notification - v1.0.3
    Preparing search index...

    Node.js implementation of Pushover API with advanced features

    Pushover Benachrichtigungsdienst

    Mobile Alert System

    const pushover = new Pushover({
    token: 'your_api_token',
    user: 'your_user_key',
    debug: true
    });

    pushover.send({
    message: 'Server backup completed',
    title: 'Backup Status',
    sound: 'cashregister'
    }, (err, result) => {
    if (err) console.error(err);
    else console.log('Notification sent:', result);
    });
    Index

    Constructors

    Methods

    Constructors

    • Parameters

      • opts: PushoverOptions

        Client configuration

        • token: string

          Application API token

        • user: string

          User/group key

        • Optionaldebug?: boolean

          Enable debug logging

        • OptionalhttpOptions?: Partial<RequestOptions> & { proxy?: string }

          HTTP request options

        • Optionalonerror?: (err: string | Error, res?: IncomingMessage) => void

          Custom error handler

        • Optionalupdate_sounds?: boolean

          Fetch latest sound list on init

      Returns Pushover

      // Basic initialization
      new Pushover({ token: 'app123', user: 'user456' });
      // Advanced configuration
      new Pushover({
      token: 'app123',
      user: 'user456',
      debug: true,
      httpOptions: { timeout: 5000 },
      update_sounds: true
      });

    Methods

    • Returns undefined | SoundMap

      Mapping of sound identifiers to display names

      getSounds

      Retrieves available notification sounds

      const sounds = pushover.getSounds();
      console.log('Available sounds:', sounds);
    • Parameters

      • payload: MessagePayload

        Notification content

      • Optionalcallback: (err?: Error, body?: string, res?: IncomingMessage) => void

        Result callback (err, body, res)

      Returns void

      send

      Sends notification via Pushover API

      // Basic notification
      pushover.send({
      message: 'New order received',
      title: 'Order Alert'
      });
      // Priority notification with callback
      pushover.send({
      message: 'SERVER DOWN!',
      title: 'CRITICAL',
      priority: 2,
      sound: 'siren'
      }, (err, result) => {
      if (err) console.error(err);
      else console.log('Sent:', result);
      });
      // With image attachment
      pushover.send({
      message: 'Security alert triggered',
      file: '/path/to/screenshot.jpg'
      });