reorganization

This commit is contained in:
Evgeny
2021-08-06 14:43:34 +03:00
parent 372ec8578d
commit 1e9b33eaea
52 changed files with 1044 additions and 20 deletions

View File

@@ -0,0 +1,16 @@
-- name = "Random jokes"
-- description = "official-joke-api.appspot.com"
-- data_source = "official-joke-api.appspot.com"
-- type = "widget"
-- author = "Evgeny Zobnin (zobnin@gmail.com)"
-- version = "1.0"
function on_alarm()
http:get("https://official-joke-api.appspot.com/random_joke")
end
function on_network_result(result)
local setup = ajson:get_value(result, "object string:setup")
local punchline = ajson:get_value(result, "object string:punchline")
ui:show_lines({setup, punchline})
end