Compare commits

..

No commits in common. "main" and "v1.1.0" have entirely different histories.
main ... v1.1.0

2 changed files with 4 additions and 7 deletions

View File

@ -10,9 +10,11 @@ inputs:
priority:
description: 'Message priority'
required: false
default: '0'
sound:
description: 'Sound to play'
required: false
default: 'pushover'
title:
description: 'Message title'
required: false

View File

@ -11,7 +11,7 @@ def get_args():
parser.add_argument('--url', type=str, help='Supplementary URL to show with your message')
parser.add_argument('--url_title', type=str, help='title for your supplementary URL, otherwise just the URL is shown')
parser.add_argument('--device', type=str, help='Device name to send the message directly to')
parser.add_argument('--priority', type=int, help='Notification priority (low-to-high: -2 to 1)')
parser.add_argument('--priority', type=str, help='Notification priority (low-to-high: -2 to 1)')
parser.add_argument('--sound', type=str, help='The name of a supported sound (https://pushover.net/api#sounds; custom sounds are supported)')
args = parser.parse_args()
return args
@ -27,7 +27,7 @@ def main():
url: str | None = args.url if args.url else None
url_title: str | None = args.url_title if args.url_title else None
device: str | None = args.device if args.device else None
priority: int | None = args.priority if args.priority else None
priority: str | None = args.priority if args.priority else None
sound: str | None = args.sound if args.sound else None
if not msg:
@ -51,11 +51,6 @@ def main():
payload['priority'] = priority
if sound:
payload['sound'] = sound
_printable_payload = payload.copy()
_printable_payload['token'] = '***'
_printable_payload['user'] = '***'
print(_printable_payload)
response = requests.post(
url='https://api.pushover.net/1/messages.json',