For Developers
Sending notifications with Notifier is as simple as sending a POST
/ PUT
request to the topic URL.
Below are some generic code snippets to help you implement Notifier into your project!
Sending Notifications via Javascript
Example Js Code
fetch('https://notify.hep.gg/british', {
method: 'POST', // PUT works too
body: 'Waer bo le'
headers: {
'Title': 'Uh oh!',
'Priority': 'urgent',
'Tags': 'warning,skull'
}
})
Sending Notifications via Curl
Example Curl Command
curl -d "Waer bo le" https://notify.hep.gg/british
Message Priorities
Priority | Icon | ID | Name | Description |
---|---|---|---|---|
Max Priority | 5 | max /urgent | Really long vibration bursts, default notification sound with a pop-over notification. | |
High Priority | 4 | high | Long vibration bursts, default notification sound with a pop-over notification. | |
Medium Priority | No Icon | 3 | medium | Short vibration bursts. Default notification behaviour. |
Low Priority | 2 | low | No vibration or sound. Notification will not visibly show up until notification drawer is pulled down. | |
Min Priority | 1 | min | No vibration or sound. The notification will be under the fold in "Other notifications". |