Đối tượng phản hồi có thể được trả về từ một phương thức tạo hành động phổ quát.
// A universal action that opens a link. const openLinkUniversalAction = AddOnsResponseService.newUniversalActionResponseBuilder() .setOpenLink(AddOnsResponseService.newOpenLink().setUrl('https://www.google.com')) .build(); const cardBuilder1 = CardService.newCardBuilder(); const cardBuilder2 = CardService.newCardBuilder(); // Finish building the cards ... // A universal action that shows two static cards. const cardsUniversalAction = AddOnsResponseService.newUniversalActionResponseBuilder() .displayAddOnCards([cardBuilder1.build(), cardBuilder2.build()]) .build();
Phương thức
| Phương thức | Kiểu dữ liệu trả về | Mô tả ngắn |
|---|---|---|
print | String | In bản trình bày JSON của đối tượng này. |
Tài liệu chi tiết
printJson()
In bản trình bày JSON của đối tượng này. Chỉ dùng cho mục đích gỡ lỗi.
Cầu thủ trả bóng
String