Files
aiolauncher_scripts/quotes-widget.lua
2021-07-29 21:02:05 +03:00

11 lines
293 B
Lua

function onAlarm()
net:getText("https://api.quotable.io/random")
end
function onNetworkResult(result)
local quote = json:getValue(result, "object string:content")
local author = json:getValue(result, "object string:author")
ui:showLinesWithAuthors({ quote }, { author })
end