add some quotes scripts

This commit is contained in:
Evgeny
2021-07-29 21:17:42 +03:00
parent 22e209211a
commit 703dff5ffb

10
quotes-ru-widget.lua Normal file
View File

@@ -0,0 +1,10 @@
function onAlarm()
net:getText("http://api.forismatic.com/api/1.0/?method=getQuote&format=json&lang=ru")
end
function onNetworkResult(result)
local quote = json:getValue(result, "object string:quoteText")
local author = json:getValue(result, "object string:quoteAuthor")
ui:showLinesWithAuthors({ quote }, { author })
end