Use a more familiar lua snake_hour

This commit is contained in:
Evgeny
2021-08-01 19:57:41 +03:00
parent 6e24536f99
commit f24288af99
26 changed files with 208 additions and 184 deletions

View File

@@ -4,13 +4,13 @@
-- author = "Evgeny Zobnin (zobnin@gmail.com)"
-- version = "1.0"
function onAlarm()
net:getText("http://api.forismatic.com/api/1.0/?method=getQuote&format=json&lang=ru")
function on_alarm()
net:get_text("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")
function on_network_result(result)
local quote = ajson:get_value(result, "object string:quoteText")
local author = ajson:get_value(result, "object string:quoteAuthor")
ui:showLines({ quote }, { author })
ui:show_lines({ quote }, { author })
end