add some quotes scripts
This commit is contained in:
10
inspiration_quotes-widget.lua
Normal file
10
inspiration_quotes-widget.lua
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
function onAlarm()
|
||||||
|
net:getText("https://inspiration.goprogram.ai/")
|
||||||
|
end
|
||||||
|
|
||||||
|
function onNetworkResult(result)
|
||||||
|
local quote = json:getValue(result, "object string:quote")
|
||||||
|
local author = json:getValue(result, "object string:author")
|
||||||
|
|
||||||
|
ui:showLinesWithAuthors({ quote }, { author })
|
||||||
|
end
|
||||||
10
quotes-widget.lua
Normal file
10
quotes-widget.lua
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
function onAlarm()
|
||||||
|
net:getText("https://api.quotable.io/random")
|
||||||
|
end
|
||||||
|
|
||||||
|
function onNetworkResult(result)
|
||||||
|
local quote = json:getValue(result, "object string:content")
|
||||||
|
local author = json:getValue(result, "object string:author")
|
||||||
|
|
||||||
|
ui:showLinesWithAuthors({ quote }, { author })
|
||||||
|
end
|
||||||
Reference in New Issue
Block a user