Class UniversalActionResponse

UniversalActionResponse

The response object that may be returned from a method that creates universal action.

// A universal action that opens a link.
var openLinkUniversalAction = CardService.newUniversalActionResponseBuilder()
    .setOpenLink(CardService.newOpenLink()
        .setUrl("https://www.google.com"))
        .build();

var cardBuilder1 = CardService.newCardBuilder();
var cardBuilder2 = CardService.newCardBuilder();
// Finish building the cards ...

// A universal action that shows two static cards.
var cardsUniversalAction = CardService.newUniversalActionResponseBuilder()
    .displayAddOnCards([
        cardBuilder1.build();
        cardBuilder2.build();
    ]).build();

Methods

MethodReturn typeBrief description
printJson()StringPrints the JSON representation of this object.

Detailed documentation

printJson()

Prints the JSON representation of this object. This is for debugging only.

Return

String

发送以下问题的反馈:

此网页
Apps Script
Apps Script
需要帮助?请访问我们的支持页面