Skip to content

Instantly share code, notes, and snippets.

View arunjeetsingh's full-sized avatar

Arunjeet Singh arunjeetsingh

View GitHub Profile
{
"type": "APL",
"version": "1.3",
"graphics": {
"clock": {
"type": "AVG",
"version": "1.0",
"parameters": [
"time"
],
{
"commands": {},
"type": "APL",
"version": "1.1",
"theme": "dark",
"mainTemplate": {
"parameters": [
"payload"
],
"items": [
{
"document": {
"type": "APL",
"version": "1.3",
"theme": "dark",
"import": [
{
"name": "alexa-layouts",
"version": "1.1.0"
},
@arunjeetsingh
arunjeetsingh / GradientBackgroundNoPicture.json
Last active July 27, 2020 23:13
An APL document with a gradient background and optional picture. More about APL here https://developer.amazon.com/en-US/docs/alexa/alexa-presentation-language/understand-apl.html.
{
"document": {
"type": "APL",
"version": "1.4",
"import": [
{
"name": "alexa-layouts",
"version": "1.2.0"
}
],
{
"document": {
"type": "APL",
"version": "1.4",
"import": [
{
"name": "alexa-layouts",
"version": "1.2.0"
}
],
{
"document": {
"type": "APL",
"version": "1.4",
"import": [
{
"name": "alexa-layouts",
"version": "1.2.0"
}
],
@arunjeetsingh
arunjeetsingh / PagingAndTalking.json
Last active November 25, 2020 16:08
An example of a skill response that plays some preamble speech and then pages through slides in a pager one at a time while synchronizing speech to the content of each slide. Could be used to tell a story with voice/sound effects, describe a set of pictures, or even a weather forecast accompanied by multiple visuals.
{
"directives": [{
"type": "Alexa.Presentation.APL.RenderDocument",
"document": {
"type": "APL",
"version": "1.5",
"onMount": [
{
"type": "Sequential",
"commands": [
@arunjeetsingh
arunjeetsingh / GoBack.json
Last active September 2, 2020 02:47
This gist consists of 3 skill responses that together show how to use the new APL back stack extension with a voice command. Page1.json shows a response that renders the first page of the interaction. Note that we load the back extension and set a backstackId on Page1 so it is added to the back stack. When a customer speaks an utterance (say "go…
//When a customer says "go back" or something similar next a skill
//can respond with GoBack.json to navigate back on the back stack.
//Note that the "token" value for the GoBack response's ExecuteCommands
//directive and the token value for the APL document currently
//rendered (Page2.json) must be the same. This is how Alexa knows where
//to direct the commands.
{
"outputSpeech": {
"type": "SSML",
{
"outputSpeech": {
"type": "SSML",
"ssml": "<speak>Watch as I move this plane using the device position!</speak>"
},
"directives": [
{
"type": "Alexa.Presentation.APL.RenderDocument",
"document": {
"type": "APL",
{
"outputSpeech": {
"type": "SSML",
"ssml": "<speak>Watch as I move this plane based on your position!</speak>"
},
"directives": [
{
"type": "Alexa.Presentation.APL.RenderDocument",
"document": {
"type": "APL",