alexa-sdk-nodejs

How to use async functions within Alexa skill properly?

蹲街弑〆低调 提交于 2021-02-11 17:41:58
问题 I am very new to async programming, so forgive me for the lack of understanding, but I am currently building an Alexa skill which calls a private parking API. You can call this API and it will give you the nearest parking spots. const getParkingSpots_Handler = { canHandle(handlerInput) { const request = handlerInput.requestEnvelope.request; return request.type === 'IntentRequest' && request.intent.name === 'getParkingSpots' ; }, handle(handlerInput) { const request = handlerInput