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