caronc / apprise-api

A lightweight REST framework that wraps the Apprise Notification Library
https://hub.docker.com/r/caronc/apprise
MIT License
638 stars 56 forks source link

How do I attach images to Discord notifications? #100

Closed namelivia closed 1 year ago

namelivia commented 1 year ago

I've read through the documentation and afaik Discord should handle notifications, I've tried doing the following post request to my apprise microservice:

curl -X POST http://172.18.0.10:8000/notify/testing -H "Content-Type: application/json" -d '{"attach": ["https://cdn.pixabay.com/photo/2016/03/21/23/25/link-1271843__480.png", "https://cdn.pixabay.com/photo/2016/03/21/23/25/link-1271843__480.png", "https://cdn.pixabay.com/photo/2016/03/21/23/25/link-1271843__480.png"], "body": "test"}'

But on discord it only appears the "test" string. Am I misusing the attachment feature or is it that is not supported by Discord? Thank you very much!

caronc commented 1 year ago

Unfortunately the API doesn't support attachments at this time, but you're certainly not the first person to want to do this.

I've been backlogged at my full-time job. But i promise to entertain some of these great ideas soon

namelivia commented 1 year ago

Unfortunately the API doesn't support attachments at this time, but you're certainly not the first person to want to do this.

I've been backlogged at my full-time job. But i promise to entertain some of these great ideas soon

Ah, nice to know! Do you have any rough estimation on how complex is this? I could even consider helping with this if you are ok with it.

caronc commented 1 year ago

It's not too too complex, but not a quick job either. Basically the Apprise library needs to be updated so that it can pass along attachments to an Apprise API server. then the Apprise API server needs to read the data in and then re-attach it (re-routing it) to the endpoints that can use it.

caronc commented 1 year ago

This has been added in the last release. Closing ticket

RaminMT commented 9 months ago

Hi Does this syntax also supported to send attachments to telegram?