rqpush 0.4.0

A library to assist with pushing notifications to RQueue.
Documentation

RQPush

A library to assist with pushing notifications to RQueue.

Provides the following functionality:

  • Builds notifications with support for Handlebar templating
  • Resolves SRV records for sending to priortized notification queues (@TODO)
  • Calculates sha256 hash, optionally salted with a shared secret (@TODO)

Notifications

RQPush requires that all notifications define the following fields:

{
    "app": "AppName",
    "category": "type of notification",
    "lang": "Langauge code",
    "title": "Subject",
    "short_text": "Short body",
    "short_html": "<P>Short body</P>",
    "long_text": "Body",
    "long_html": "<P>Full body</P>",
}

For example:

{
    "app": "Netgrasp",
    "category": "first_seen_device",
    "lang": "en",
    "title": "[netgrasp] new device: iPhone",
    "short_text": "A new device joined your network: iPhone",
    "short_html": "<P>A new device joined your network: <EM>iPhone</EM></P>",
    "long_text": "A new device joined your network:
     * iPhone
     * ip: 10.202.14.37 [ff:ff:ff:ff:ff:ff]
     * previously seen: never
     * first seen: now

    In the past 24 hours this device talked to 1 device:
     * Gateway: 10.202.14.1

    Email generated by Netgrasp passive network observation tool.",
    "long_html": "<P><UL>
     <LI>iPhone</LI>
     <LI>ip: 10.202.14.37 [ff:ff:ff:ff:ff:ff]</LI>
     <LI>previously seen: never</LI>
     <LI>first seen: now</LI>
    </UL>
    In the past 24 hours this device talked to 1 device:
    <UL>
     <LI>Gateway: 10.202.14.1</LI>
    </UL></P>
    <DIV ID="footer">
     <P><SMALL><EM>Email generated by Netgrasp passive network observation tool.</EM></SMALL></P>
    </DIV>",
}