Skip to content

Instantly share code, notes, and snippets.

@RSamaium
Created September 3, 2019 16:51
Show Gist options
  • Save RSamaium/3014a9078e90a39071c23373ee75091b to your computer and use it in GitHub Desktop.
Save RSamaium/3014a9078e90a39071c23373ee75091b to your computer and use it in GitHub Desktop.
@Intent('apod', [
'View picture of the day',
'Show image'
])
apod() {
apod = getApod()
if (apod.media_type == 'video') {
@Format('buttons', [
{
title: 'View Video',
url: apod.url
}
])
> { apod.title }
}
else {
@Format('image', apod.url)
> { apod.title }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment