-
Notifications
You must be signed in to change notification settings - Fork 171
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
API: send - special case for single recipients for use with limited senders #428
Comments
I just realized there's an existing issue, #372, involving Synology's notification service having a similar limitation where the requirement that The API is designed around rich multimedia chat and these weird clients are of course not the focus. But it would occasionally be handy to be able to send machine-generated alerts to oneself! |
That's a tough one. On the one hand, I can see that there are certain clients out there which for whatever reason don't support the array syntax. On the other hand, this is probably also the minority. And adding a simplified endpoint probably makes it a bit more confusing for the regular user. But as this is already the second issue in that regard, I can see that there is a need for that. I'll think about it. Are you currently blocked by that or did you find a workaround? |
Hi @bbernhard. In your last post you wanted to think about making |
* some REST API consumers (like the Synology NAS) do not allow to use an array for the recipients. So, in order to support those platforms as well, a 'recipient' string parameter is added. As most users are perfectly fine with the array parameter, the recipient parameter won't be exposed in the Swagger UI. see #428
I've just added a |
Thanks you very much! Would you push this new version to docker hub, so I can just get the image? |
Here's a test version: |
Feature Request
The
v2/send
endpoint's requirement thatrecipients
be a list of strings is difficult to satisfy when calling through services that offer limited expressiveness for building a JSON object. While this isn't the API's fault, it would occasionally be really helpful if"recipients":"number"
were treated as being equivalent to"recipients":["number"]
, or if there was an alternative"recipient":"number"
parameter with the same effect.I've been struggling with satisfying this endpoint lately in various notifier services:
Here with
diun
, although I found a workaround;Here with shoutrrr, which maps url query params into a single level dict of strings, but can't currently express more complex JSON.
The text was updated successfully, but these errors were encountered: