Created
September 3, 2019 16:51
-
-
Save RSamaium/3014a9078e90a39071c23373ee75091b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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