Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
getSmallImage(selectedState.Abbreviation),
getLargeImage(selectedState.Abbreviation),
);
speechOutput = getSpeechDescription(selectedState);
if (supportsDisplay(handlerInput)) {
const image = new Alexa.ImageHelper()
.addImageInstance(getLargeImage(selectedState.Abbreviation))
.getImage();
const bgImage = new Alexa.ImageHelper()
.addImageInstance(getBackgroundImage(800, 1200, selectedState.Abbreviation))
.getImage();
const title = getCardTitle(selectedState);
const bodyTemplate = bodyTemplateChoice(getCardTitle(selectedState));
const primaryText = new Alexa.RichTextContentHelper()
.withPrimaryText(getTextDescription(selectedState, '<br>'))
.getTextContent();
responseBuilder.addRenderTemplateDirective({
type: bodyTemplate,
backButton: 'visible',
backgroundImage: bgImage,
image,
title,
textContent: primaryText,
});
speechOutput = `This is the ${getBodyTemplateName(bodyTemplate)} template, also known as body template number ${getBodyTemplateNumber(bodyTemplate)}. `;
}
return responseBuilder.speak(speechOutput + repromptOutput)
.reprompt(repromptOutput)