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
| class EscogerComidaIntent : RequestHandler { | |
| override fun canHandle(input: HandlerInput): Boolean { | |
| return input.matches(Predicates.intentName("escoger_comida")) | |
| } | |
| override fun handle(input: HandlerInput): Optional<Response> { | |
| if (!input.attributesManager.sessionAttributes.containsKey(AttributeConstants.FOOD) | |
| || !input.attributesManager.sessionAttributes.containsKey(AttributeConstants.RESTAURANT) | |
| ) { | |
| return input.responseBuilder |
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
| class ListarRestaurantesPorTipoDeComidaIntent : RequestHandler { | |
| override fun canHandle(input: HandlerInput): Boolean { | |
| return input.matches(Predicates.intentName("listar_restaurantes_por_tipo_de_comida")) | |
| } | |
| override fun handle(input: HandlerInput): Optional<Response> { | |
| val request = input.requestEnvelope.request | |
| val intentRequest = request as IntentRequest | |
| val intent = intentRequest.intent | |
| val slots = intent.slots |
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
| class LogRequestInterceptor : RequestInterceptor { | |
| override fun process(input: HandlerInput) { | |
| input.attributesManager.requestAttributes[SOME_REQUEST_ATTRIBUTE] = "someAttributeValue" | |
| println("Request: ${JacksonSerializer().serialize(input.request)}") | |
| } | |
| } | |
| class AnyIntentHandler : RequestHandler { | |
| override fun canHandle(input: 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
| class SessionEndedRequestHandler : RequestHandler { | |
| override fun canHandle(input: HandlerInput): Boolean { | |
| return input.matches(Predicates.requestType(SessionEndedRequest::class.java)) | |
| } | |
| override fun handle(input: HandlerInput): Optional<Response> { | |
| return input.responseBuilder.build() | |
| } | |
| } |
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
| if (movies.isEmpty()) { | |
| text = Translations.getMessage(language, Translations.TranslationKey.UPCOMINGS_NOT_FOUND) + | |
| Translations.getMessage(language, Translations.TranslationKey.ASKING_FOR_NOW_PLAYING) | |
| shouldEndSession = false | |
| } else { | |
| text = "${Translations.getMessage(language, Translations.TranslationKey.UPCOMINGS_RESPONSE)}: " + | |
| movies.map { it.getTitle() }.getResponse(language) | |
| shouldEndSession = true | |
| } | |
| return input.responseBuilder |
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
| "session": { | |
| "new": true, | |
| "sessionId": "amzn1.echo-api.session.deaf0bba-3030-4032-a074-8089de63a1b4", | |
| "application": { | |
| "applicationId": "amzn1.ask.skill.2cba1120-0189-4bd1-99cc-665c3dd08d1a" | |
| }, | |
| "user": { | |
| "userId": "amzn1.ask.account.AFAHMYPW5RM23DH4E5MMX7L5BTRN6DCZHJ7OLW4CSFY74PV5HVNE45MTKRG655NQLPTFOX72ZFNHHQW7CPCQ3AIRM64VRXX5P4BXWKN34FHIMB4P6UYZV2IMK74DL47QSMSR56QIRY4O4LPMQ3P2TKKH3NXUQ27YJESGPNDIYW5YCD7HDZBR2HP2TBPW45KSFENHX52CLETFVCI" | |
| } | |
| } |
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>APL Sequence Issue</speak>" | |
| }, | |
| "directives": [ | |
| { |
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.b04f7fa9-45c6-4786-85b8-21bb740e012b", | |
| "application": { | |
| "applicationId": "amzn1.ask.skill.2fa4bb09-79f8-4550-9fc7-862904efdad6" | |
| }, | |
| "user": { | |
| "userId": "amzn1.ask.account.AFWMPEXPBNFG3SENLJ7OMBL3VDC43YLASSTLWWKEAXATMFT7QPFZ3NKCENUSX6SIFB4EYWTUQDNLBVK6QKPGJB4ACB4VQCCQK2H7FNRYECWM6YDZW4JFBHXP4O7T3LSA4VBFZ6JFLIU2RH3GV7IPE5UC2NTYFIMYATAVC5XCADFKEKCLPGX7J43ERRWM5DWPRH3Q7FZHQKIZHAA" |
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
| { | |
| "templateMetadata": { | |
| "type": "object", | |
| "sequenceItems": ["", "", "", "", ""] | |
| } | |
| } |
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": "APL", | |
| "version": "1.2", | |
| "import": [ | |
| { | |
| "name": "alexa-layouts", | |
| "version": "1.1.0" | |
| } | |
| ], | |
| "layouts": { |