Class ActionResponse

ActionResponse

클라이언트에서 하나 이상의 작업을 수행하기 위해 콜백 함수 (예: 양식 응답 핸들러)에서 반환될 수 있는 응답 객체입니다. 일부 작업 조합은 지원되지 않습니다.

// An action that opens a link
var actionResponse = CardService.newActionResponseBuilder()
    .setOpenLink(CardService.newOpenLink()
        .setUrl("https://www.google.com"))
    .build();

// An action that shows a notification.
var actionResponse = CardService.newActionResponseBuilder()
    .setNotification(CardService.newNotification()
        .setText("Some info to display to user"))
    .build();

// An action that shows an additional card. It also sets a flag to indicate that the original
// state data has changed.

var cardBuilder = CardService.newCardBuilder();
// Build card ...
var actionResponse = CardService.newActionResponseBuilder()
    .setNavigation(CardService.newNavigation()
        .pushCard(cardBuilder.build()))
    .setStateChanged(true)
    .build();

방법

메서드반환 유형간략한 설명
printJson()String이 객체의 JSON 표현을 출력합니다.

자세한 문서

printJson()

이 객체의 JSON 표현을 출력합니다. 디버깅 전용입니다.

리턴

String