Files
aiolauncher_scripts/random-joke-widget.lua
2021-07-29 07:51:07 +03:00

10 lines
303 B
Lua

function onAlarm()
net:getText("https://official-joke-api.appspot.com/random_joke")
end
function onNetworkResult(result)
local setup = json:getValue(result, "object string:setup")
local punchline = json:getValue(result, "object string:punchline")
aio:showLines({setup, punchline})
end