add some quotes scripts
This commit is contained in:
10
quotes-widget.lua
Normal file
10
quotes-widget.lua
Normal file
@@ -0,0 +1,10 @@
|
||||
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
|
||||
Reference in New Issue
Block a user