Parkerc,
One last post to let you know how well it worked. I modified the push_link function slightly to add the devname and sound as new arguments. I put the apptoken and usertoken in the Startup Lua as global variables, so I didn’t need to include them to every scene. I modified about 50 scenes with the new code, and I’m happy with the results. Here’s a template of the new code:
– global tokens, apptoken and usertoken, defined in startup lua
local http = require(“socket.http”)
local https = require(“ssl.https”)
local url = “https://api.pushover.net/1/messages.json”
https.TIMEOUT = 5
function push_link(apptoken, iosdevname, title, message, priority, sound, url, urltitle)
local status = https.request ( “https://api.pushover.net/1/messages.json” , “token=”…apptoken…“&user=”…usertoken…“&device=”…iosdevname…“&message=”…message…“&title=”…title…“&priority=”…priority…“×tamp=”…os.time()…“&url=”…url…“&url_title=”…urltitle…“&sound=”…sound)
end
push_link(apptoken, “RobsiPhone”, “Testing global tokens for pushover”, “oh yeah”, 1, “bugle”, ‘’, “”)
– Note: The sound argument must be in lower case to be accepted by Pushover