Move useless scripts to samples folder

This commit is contained in:
Evgeny
2024-04-18 14:47:18 +04:00
parent 3242d9c24f
commit 5eea6d8b91
8 changed files with 1 additions and 0 deletions

16
samples/btc-widget.lua Normal file
View File

@@ -0,0 +1,16 @@
-- name = "Bitcoin price"
-- description = "Current Bitcoin price (blockchain.info)"
-- type = "widget"
-- author = "Evgeny Zobnin (zobnin@gmail.com)"
-- version = "1.0"
equals = "<font color=\""..ui:get_colors().secondary_text.."\"> = </font>"
function on_alarm()
http:get("https://api.blockchain.info/ticker")
end
function on_network_result(result)
local price = ajson:get_value(result, "object object:USD string:last")
ui:show_text("1 BTC"..equals..price.." USD")
end