themarshallproject / klaxon

Klaxon enables reporters and editors to monitor scores of sites on the web for newsworthy changes.
https://newsklaxon.org
MIT License
646 stars 199 forks source link

Integrate with Pushover API #448

Closed fourofspades closed 8 months ago

fourofspades commented 3 years ago

The email notifications are clunky set up and clunky to use (nobody is selected by default on new monitors). Is there any way I an integrate this with Pushover API to I get phone notifications?

https://pushover.net/api

tommeagher commented 3 years ago

Hi @fourofspades. We're not familiar with this API, but if you want to send a pull request, we're happy to take a look and merge if it works for us.

Also, you raise a good point about default checks for emails. At the very least, it should check the user who creates the alert. I've created an issue for us to add that in a future release.

fourofspades commented 3 years ago

Not familiar with ruby language, so developing this might be an uphill struggle, I also have no knowledge on how I would build, test and deploy a fork on the Heroku platform.

Thats alot I dont know! What I do know, Pushover is a really good notifications system with clients for most systems, and a really good clean API with example code and libraries for most platforms and languages, including ruby.

https://support.pushover.net/i44-example-code-and-pushover-libraries#ruby

To integrate this, you would need somewhere to register your personal API key and App token for routing.

The API from ruby looks quite easy, obviously the example code is just plaintext in the example, but you can send rich format with links.

require "net/https"

url = URI.parse("https://api.pushover.net/1/messages.json")
req = Net::HTTP::Post.new(url.path)
req.set_form_data({
  :token => "APP_TOKEN",
  :user => "USER_KEY",
  :message => "hello world",
})
res = Net::HTTP.new(url.host, url.port)
res.use_ssl = true
res.verify_mode = OpenSSL::SSL::VERIFY_PEER
res.start {|http| http.request(req) }

Why include another notification system? The current options, slack and discord are all tailored for groups, not individuals, email is clunky and not realtime. I believe Pushover fills this feature gap. It's realtime notifications for individuals.

tommeagher commented 8 months ago

Hi all. With the recent release of Klaxon Cloud, we're going back and revisiting old issues that we're not going to pursue or support as we consider any future development of the original standalone Klaxon. This one (almost 4 years old now) falls in that bucket. Thanks for the contributions and discussions on this, but we'll close it as WONTFIX.