Skip to content

Instantly share code, notes, and snippets.

@xeladotbe
Last active April 21, 2020 07:58
Show Gist options
  • Save xeladotbe/ef18256e39a30f443e824c6c47d4f5dc to your computer and use it in GitHub Desktop.
Save xeladotbe/ef18256e39a30f443e824c6c47d4f5dc to your computer and use it in GitHub Desktop.
APL 1.3 refresh image every 30 seconds
{
"type": "APL",
"version": "1.3",
"settings": {
"idleTimeout": 300000
},
"theme": "dark",
"import": [],
"resources": [],
"styles": {},
"onMount": [],
"graphics": {},
"commands": {},
"layouts": {},
"mainTemplate": {
"parameters": [
"payload"
],
"items": [
{
"type": "Container",
"alignItems": "center",
"justifyContent": "center",
"items": [
{
"type": "Image",
"width": 640,
"height": 480,
"source": "https://placem.at/places?w=640&h=480&random=${Time.format('YYYYMMDDHHMM', localTime)}${(Math.floor(Time.seconds(localTime) / 30) * 30) % 60}"
}
]
}
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment