C9Glax / tranga

Docker-Container to monitor (Manga) Scanlation-Sites for download new chapters.
GNU General Public License v3.0
156 stars 15 forks source link

[Enhancement]: Arbitrary REST Notification Webhook #259

Open ChrislyBear-GH opened 2 months ago

ChrislyBear-GH commented 2 months ago

Hello,

I have an idea that could enhance the application:

It would be great if there was a general webhook for notifications available. When a notification has to be sent, it would be nice to be able to send the notification information via a POST request to some other webservice.

The content could be the same as e.g. for Gotify or the other notification services.

I assume the payload would be in JSON, so it would be easy to e.g. integrate these notifications in a Home Assistent instance and react to new downloads. Or (what I'm doing) have NodeRED ingest the notification and do all kinds of stuff!

What configuration is needed for such a new notification type:

  1. A URL (endpoint) to POST to and
  2. Authentication (basic auth (user/pass) or adding a Bearer token to the header)

Again, the payload could be a JSON with the info that is already being exposed through the ither services.

What do you think? Is this something that might enhance the app?

Kind regards, Chris

C9Glax commented 1 month ago

Definitely sounds good! Don't know yet when I have the motivation to do something bigger than Bugfixes again, as right now I pretty much have all the functionality that I want. There is also a big project on the horizon that I want to migrate to a proper Database setup instead of what I have now with files... So I am definitely not done with Tranga yet, but right now I just don't have the motivation.

schklom commented 1 month ago

This is already doable thanks to https://github.com/caronc/apprise-api. It can act as a middle-man: Tranga -> apprise -> ntfy/gotify/pushbullet/etc

@C9Glax Don't re-invent the wheel and just use that :P