function buildCard(pageTitle, summary, showRating = true) {

  let cardHeader = CardService.newCardHeader()
    .setTitle('About this page');

  let summarySection = CardService.newCardSection()
    .addWidget(CardService.newTextParagraph().setText(summary));

  let feedbackSection = CardService.newCardSection()
    .setHeader('Rate this summary');

  if (showRating) {
    let thumbsUpAction = CardService.newAction()
      .setFunctionName('onRatingClicked')
      .setParameters({
        'key': 'upVotes',
        'title': pageTitle,
        'pageSummary': summary
      });

    let thumbsDownAction = CardService.newAction()
      .setFunctionName('onRatingClicked')
      .setParameters({
        'key': 'downVotes',
        'title': pageTitle,
        'pageSummary': summary
      });

    let thumbsUpButton = CardService.newImageButton()
      .setIconUrl(
        'https://fonts.gstatic.com/s/i/googlematerialicons/thumb_up_alt/v11/gm_blue-24dp/1x/gm_thumb_up_alt_gm_blue_24dp.png'
      )
      .setAltText('Looks good')
      .setOnClickAction(thumbsUpAction);

    let thumbsDownButton = CardService.newImageButton()
      .setIconUrl(
        'https://fonts.gstatic.com/s/i/googlematerialicons/thumb_down_alt/v11/gm_blue-24dp/1x/gm_thumb_down_alt_gm_blue_24dp.png'
      )
      .setAltText('Not great')
      .setOnClickAction(thumbsDownAction);

    let ratingButtons = CardService.newButtonSet()
      .addButton(thumbsUpButton)
      .addButton(thumbsDownButton);
    feedbackSection.addWidget(ratingButtons)
  } else {
    feedbackSection.addWidget(CardService.newTextParagraph().setText("Thank you for your feedback."))
  }


  let card = CardService.newCardBuilder()
    .setHeader(cardHeader)
    .addSection(summarySection)
    .addSection(feedbackSection)
    .build();
  return card;
}
Creates the Card to display documentation summary to user.

@param {string} pageTitle Title of the page/card section.
@param {string} summary Page summary to display.
@return {!Card}