New UpdateYou can now make your own scripts/plugins and programmatically trigger custom notifications through an API endpoint.
1. Run
/api and grab your API token.
2. Trigger notifications with the endpoint:
POST https://api.ninjastic.space/notification
{
"api_key": "XXXXXXXXXXXXXX",
"message: "You have <b>1</b> new message from <b>satoshi</b>\n\nCheck now!"
}
Style the message with HTML tags supported by telegram:
https://core.telegram.org/api/entities#allowed-entitiesAs an example, I made a very simple bash script that triggers a notification if you have any unread personal messages:

#!/bin/bash
forumUsername=""
forumPassword=""
forumCaptchaCode=""
supernotifierApiKey=""
login=$(curl -s -c cookies.txt -X POST -L \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "user=${forumUsername}&passwrd=${forumPassword}&cookieneverexp=on&hash_passwrd" \
--url "https://bitcointalk.org/index.php?action=login2;ccode=${forumCaptchaCode}"
)
page=$(curl -s -b cookies.txt --url https://bitcointalk.org)
messages=$(echo "$page" | grep -oP 'My Messages \[<strong>\K\d+(?=<\/strong>\])')
if [ -z $messages ]; then
messages=0
fi
if [ $messages -gt 0 ]; then
curl -s -X POST \
-H "Content-Type: application/json" \
-d "{ \
\"api_key\": \"${supernotifierApiKey}\",
\"message\": \"You have <b>${messages}</b> new personal message(s)!\n\nhttps://bitcointalk.org/index.php?action=pm\"
}" --url https://api.ninjastic.space/notification
fi
Could be useful for custom self-hosted solutions (e.g that require authentication, like the example above) or maybe some kind of subscription newsletter? For example, a signature manager or company could take API keys from interested users and send announcements
en mass.
Let me know if you have ideas for a plugin you would like to use!
Thanks everyone for the kind words.
