examples/amazon-lex-with-lambda.js
function buildResponseCard(title, subTitle, options) {
    let buttons = null;
    if (options != null) {
        buttons = [];
        for (let i = 0; i < Math.min(5, options.length); i++) {
            buttons.push(options[i]);
        }
    }
    return {
        contentType: 'application/vnd.amazonaws.card.generic',
        version: 1,
        genericAttachments: [{
            title,
            subTitle,
            buttons,
        }],
    };
}
function buildResponseCard(title, subTitle, options) {
    let buttons = null;
    if (options != null) {
        buttons = [];
        for (let i = 0; i < Math.min(5, options.length); i++) {
            buttons.push(options[i]);
        }
    }
    return {
        contentType: 'application/vnd.amazonaws.card.generic',
        version: 1,
        genericAttachments: [{
            title,
            subTitle,
            buttons,
        }],
    };
}
function buildResponseCard ( title , subTitle , options ) { let buttons = null ; if ( options != null ) { buttons = [ ] ; for ( let i = 0 ; i < Math . min ( 5 , options . length ) ; i ++ ) { buttons . push ( options [ i ] ) ; } } return { contentType : 'application/vnd.amazonaws.card.generic' , version : 1 , genericAttachments : [ { title , subTitle , buttons , } ] , } ; }
Build a responseCard with a title, subtitle, and an optional set of options which should be displayed as buttons.
Build a responseCard with a title subtitle and an optional set of options which should be displayed as buttons .