Der-Henning / tgtg

Scanner for Too Good To Go Notifications
https://github.com/Der-Henning/tgtg/wiki
GNU General Public License v3.0
407 stars 65 forks source link

Add Apprise notifier #291

Closed leonghui closed 1 year ago

leonghui commented 1 year ago

Thanks for this awesome tool!

Apprise is a notification library that supports a wide array of platforms (e.g. Amazon SNS, Gotify, SMS (Twilio), Signal). The current notifiers are also available through Apprise, which might be confusing to new users. IMHO adding Apprise will provide users with more options and reduce the need for new notifiers to be added manually (e.g. #278).

Der-Henning commented 1 year ago

The latest edge docker images and this pre-Release now contain the apprise notifier. I will create a new Release after some testing. Any feedback is appreciated :)

leonghui commented 1 year ago

Switched to the edge-alpine image. Apprise -> Signal-API works great so far, thanks!

2023-03-08 17:21:25 INFO     Activated notifiers:
2023-03-08 17:21:25 INFO     - Apprise signal://signal-api:8080/+xxxxxxxxx/+xxxxxxxxx
2023-03-08 17:21:25 INFO     Sending test Notifications ...
2023-03-08 17:21:25 DEBUG    Starting new HTTPS connection (1): play.google.com:443
2023-03-08 17:21:25 DEBUG    https://play.google.com:443 "GET /store/apps/details?id=com.app.tgtg&hl=en&gl=US HTTP/1.1" 200 None
2023-03-08 17:21:26 DEBUG    Using APK version 23.2.11.
2023-03-08 17:21:26 DEBUG    Starting new HTTPS connection (1): apptoogoodtogo.com:443
2023-03-08 17:21:26 DEBUG    https://apptoogoodtogo.com:443 "POST /api/auth/v3/token/refresh HTTP/1.1" 200 None
2023-03-08 17:21:26 DEBUG    https://apptoogoodtogo.com:443 "POST /api/item/v7/ HTTP/1.1" 200 None
2023-03-08 17:21:26 DEBUG    Sending Apprise Notification
2023-03-08 17:21:26 DEBUG    Apprise url: signal://signal-api:8080/+xxxxxxxxx/+xxxxxxxxx
2023-03-08 17:21:26 DEBUG    Apprise Title: TGTG Scanner
2023-03-08 17:21:26 DEBUG    Apprise Body: xxxxxxxxx (xxxxxxx Bag) - new amount: 0 - https://share.toogoodtogo.com/item/xxxxxx
2023-03-08 17:21:26 DEBUG    Loaded Signal API URL: signal://signal-api:8080/+xxxxxxxxx/+xxxxxxxxx?batch=no&status=no&format=text&overflow=upstream&rto=4.0&cto=4.0&verify=yes
2023-03-08 17:21:26 DEBUG    Using selector: EpollSelector
2023-03-08 17:21:26 INFO     Notifying 1 service(s) asynchronously.
2023-03-08 17:21:26 DEBUG    Signal API POST URL: http://signal-api:8080/v2/send (cert_verify=True)
2023-03-08 17:21:26 DEBUG    Signal API Payload: {'message': 'TGTG Scanner\r\xxxxxxxxx (xxxxxxx Bag) - new amount: 0 - https://share.toogoodtogo.com/item/xxxxxx', 'number': '+xxxxxxxxx', 'recipients': ['+xxxxxxxxx']}
2023-03-08 17:21:26 DEBUG    Starting new HTTP connection (1): signal-api:8080
2023-03-08 17:21:29 DEBUG    http://signal-api:8080 "POST /v2/send HTTP/1.1" 201 29
2023-03-08 17:21:29 INFO     Sent 1 Signal API notification to +xxxxxxxxx.
Der-Henning commented 1 year ago

Release 1.16.0 now contains the Apprise Notifier.