Created
April 26, 2020 09:09
-
-
Save kinisoftware/abb9ddb7668113281a3d6c0b9dca9951 to your computer and use it in GitHub Desktop.
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 | |
| ) | |
| .addErrorHandlers(errorHandler) | |
| .addRequestInterceptors( | |
| localisationRequestInterceptor, | |
| loggingRequestInterceptor, | |
| loadAttributesRequestInterceptor | |
| ) | |
| .withPersistenceAdapter( | |
| new DynamoDbPersistenceAdapter({ | |
| tableName: 'my_tv_shows_skill', | |
| createTable: true, | |
| partitionKeyGenerator: requestEnvelope => { | |
| const userId = alexa.getUserId(requestEnvelope); | |
| return userId.substr(userId.lastIndexOf('.') + 1); | |
| }, | |
| }) | |
| ) | |
| .addResponseInterceptors(saveAttributesResponseInterceptor, loggingResponseInterceptor) | |
| .lambda(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment