This file contains hidden or 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
| { | |
| "type": "Pager", | |
| "id": "moviesPager", | |
| "width": "100vw", | |
| "height": "70vh", | |
| "item": [ | |
| { | |
| "type": "moviesListLayout", | |
| "title": "${data.title}", | |
| "releaseDate": "${data.releaseDate}", |
This file contains hidden or 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
| import * as alexa from 'ask-sdk-core'; | |
| import {HandlerInput} from 'ask-sdk-core'; | |
| import {Response} from 'ask-sdk-model'; | |
| import {SessionAttributes} from '../model/sessionAttributes'; | |
| export const saveAttributesResponseInterceptor = { | |
| async process(handlerInput: HandlerInput, response: Response) { | |
| if (!response) return; // avoid intercepting calls that have no outgoing response due to errors | |
| const {attributesManager, requestEnvelope} = handlerInput; |
This file contains hidden or 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
| import * as alexa from 'ask-sdk-core'; | |
| import {HandlerInput} from 'ask-sdk-core'; | |
| import {SessionAttributes} from '../model/sessionAttributes'; | |
| export const loadAttributesRequestInterceptor = { | |
| async process(handlerInput: HandlerInput) { | |
| const {attributesManager, requestEnvelope} = handlerInput; | |
| if (alexa.isNewSession(requestEnvelope)) { | |
| const persistentAttributes = await attributesManager.getPersistentAttributes(); | |
| let sessionAttributes: SessionAttributes; |
This file contains hidden or 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
| const persistentAttributes = await handlerInput.attributesManager.getPersistentAttributes(); | |
| // Do stuff | |
| attributesManager.setPersistentAttributes({// Persistente data}); | |
| await attributesManager.savePersistentAttributes(); |
This file contains hidden or 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
| exports.handler = alexa.SkillBuilders.custom() | |
| .addRequestHandlers( | |
| launchRequestHandler, | |
| addTvShowIntentHandler, | |
| tvShowRecommendationIntentHandler, | |
| helpIntentHandler, | |
| cancelAndStopIntentHandler, | |
| fallbackIntentHandler, | |
| sessionEndedRequestHandler, | |
| intentReflectorHandler |
This file contains hidden or 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
| { | |
| "version": "1.0", | |
| "session": { | |
| "new": false, | |
| "sessionId": "amzn1.echo-api.session.d08ed728-0d06-4ec0-ba6a-ad217d92bcb2", | |
| "application": { | |
| "applicationId": "amzn1.ask.skill.e6b8a7c8-8d5e-4a4d-aeb4-755d250f474d" | |
| }, | |
| "attributes": { | |
| "comida": "pizza" |
This file contains hidden or 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
| { | |
| "body": { | |
| "version": "1.0", | |
| "response": { | |
| "outputSpeech": { | |
| "type": "SSML", | |
| "ssml": "<speak>Puedes comer pizza en: Pizzeria Lucio, Pizzeria Donatello, Al rico tiramisú, Pasta al dente</speak>" | |
| }, | |
| "shouldEndSession": false, | |
| "type": "_DEFAULT_RESPONSE" |
This file contains hidden or 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
| { | |
| "version": "1.0", | |
| "session": { | |
| "new": false, | |
| "sessionId": "amzn1.echo-api.session.d08ed728-0d06-4ec0-ba6a-ad217d92bcb2", | |
| "application": { | |
| "applicationId": "amzn1.ask.skill.e6b8a7c8-8d5e-4a4d-aeb4-755d250f474d" | |
| }, | |
| "user": { | |
| "userId": "amzn1.ask.account.AGLW474IZG3UAHXPAHXBIG3USCXSUZAKHJEXXOKDHV7PLBTCKXI3FFWRAOFOHMFU7RENRIQ5GEGOPMHOESWUFN4GNUBZXEPEEEPZ3KV5C7SUTZXIPLNDAZUKKMXO53CBQP5FU33PYRDWMRJIHJUBY433FLJSTHQPJ7RN46E4S7ITUP5RLFD7WLGQ7JMLUQEYW5IXUUZOWT7I2KA" |
This file contains hidden or 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
| { | |
| "body": { | |
| "version": "1.0", | |
| "response": { | |
| "outputSpeech": { | |
| "type": "SSML", | |
| "ssml": "<speak>hey, ¿qué te apetece comer hoy?</speak>" | |
| }, | |
| "reprompt": { | |
| "outputSpeech": { |
This file contains hidden or 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
| { | |
| "version": "1.0", | |
| "session": { | |
| "new": true, | |
| "sessionId": "amzn1.echo-api.session.d08ed728-0d06-4ec0-ba6a-ad217d92bcb2", | |
| "application": { | |
| "applicationId": "amzn1.ask.skill.e6b8a7c8-8d5e-4a4d-aeb4-755d250f474d" | |
| }, | |
| "user": { | |
| "userId": "amzn1.ask.account.AGLW474IZG3UAHXPAHXBIG3USCXSUZAKHJEXXOKDHV7PLBTCKXI3FFWRAOFOHMFU7RENRIQ5GEGOPMHOESWUFN4GNUBZXEPEEEPZ3KV5C7SUTZXIPLNDAZUKKMXO53CBQP5FU33PYRDWMRJIHJUBY433FLJSTHQPJ7RN46E4S7ITUP5RLFD7WLGQ7JMLUQEYW5IXUUZOWT7I2KA" |