Initial commit
This commit is contained in:
14
isdayoff_ru-widget.lua
Normal file
14
isdayoff_ru-widget.lua
Normal file
@@ -0,0 +1,14 @@
|
||||
function onAlarm()
|
||||
local dateStr = os.date('%Y%m%d')
|
||||
net:getText("https://isdayoff.ru/"..dateStr)
|
||||
end
|
||||
|
||||
function onNetworkResult(result)
|
||||
if result == "0" then
|
||||
aio:showText("Сегодня рабочий день")
|
||||
elseif result == "1" then
|
||||
aio:showText("Сегодня выходной")
|
||||
else
|
||||
aio:showText("Ошибка")
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user