-
Notifications
You must be signed in to change notification settings - Fork 0
/
handler.js
24 lines (22 loc) · 867 Bytes
/
handler.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
'use strict';
const alexa = require('ask-sdk-core');
const skillBuilder = alexa.SkillBuilders.custom();
const {DynamoDbPersistenceAdapter} = require('ask-sdk-dynamodb-persistence-adapter');
const persistenceAdapter = new DynamoDbPersistenceAdapter({
tableName: process.env.DYNAMODB_TABLE,
});
exports.handler = skillBuilder
.addRequestHandlers(
require('./handlers/cancel'),
require('./handlers/get-address'),
require('./handlers/get-collection-schedule'),
require('./handlers/help'),
require('./handlers/launch'),
require('./handlers/stop'),
require('./handlers/unhandled'),
require('./handlers/session-ended')
)
.addErrorHandlers(require('./handlers/get-address-error'))
.withApiClient(new alexa.DefaultApiClient())
.withPersistenceAdapter(persistenceAdapter)
.lambda();