question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Pushover priority parameter documentation

See original GitHub issue

Question

Hello,

I’m using apprise from the Docker image v0.7.1. My understanding of the documentation on https://github.com/caronc/apprise/wiki/Notify_pushover is that the priority parameter should be a string (low, moderate, normal, high, or emergency). However, that didn’t work. I found out that the priority should be passed as an integer instead (same as the Pushover API documented on https://pushover.net/api#priority).

Should the documentation be fixed or is the code misbehaving? (In my opinion, it makes sense to pass it as an integer, since it matches the Pushover API).

Thanks, Sylvain

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:12 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
spaschecommented, Jun 3, 2022

I agree that it would be a better user experience if the parameters in YAML behave the same way as parameters from the URL.

I ran this command to check which plugins might be impacted by the same issue (i.e. the ones that use a map to convert from a string value to int):

rg -l --multiline  --multiline-dotall 'def parse_url.*_map' apprise/plugins/
apprise/plugins/NotifyGrowl.py
apprise/plugins/NotifyOpsgenie.py
apprise/plugins/NotifyD7Networks.py
apprise/plugins/NotifyProwl.py
apprise/plugins/NotifyNtfy.py
apprise/plugins/NotifyGotify.py
apprise/plugins/NotifyDBus.py
apprise/plugins/NotifyDapnet.py
apprise/plugins/NotifyPushover.py
apprise/plugins/NotifyGnome.py
apprise/plugins/NotifyJoin.py

So while it would be possible to modify the Pushover plugin, I think the better approach would be to refactor all plugins so that __init__ and parse_url share the same logic for converting parameters.

That would be a non-trivial refactoring of the codebase 😉

Maybe until this is all aligned, the documentation could warn about this discrepancy when specifying parameters as YAML properties.

0reactions
caronccommented, Jun 9, 2022

Closing this ticket off as it’s resolved now 🚀🚀

Read more comments on GitHub >

github_iconTop Results From Across the Web

API - Pushover
Messages sent without a priority parameter, or sent with the parameter set to 0 , will have the default priority. These messages trigger...
Read more >
API Reference — pushover_complete 1.1.2-dev documentation
priority (int) – An integer representing the priority of the message, from -2 (least important) to 2 (emergency). Default is 0. retry (int)...
Read more >
pushoverr: Send Push Notifications using 'Pushover'
check_receipt() checks the status of an emergency priority message, receiving information about whether and by whom it was acknowledged, when ...
Read more >
Pushover - Make
For these scenarios, your app may send messages to the API with the timestamp parameter set to the time of the original message....
Read more >
Notifier::Pushover (Extra) · Backup Documentation
Please read the Pushover API documentation for further details of the configuration parameters. Registration is free, but you do need to purchase the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found