Class UniversalActionResponse
यूनिवर्सलकार्रवाईजवाब
रिस्पॉन्स ऑब्जेक्ट, जो यूनिवर्सल ऐक्शन बनाने वाले तरीके से दिखाया जा सकता है.
// A universal action that opens a link.
const openLinkUniversalAction =
CardService.newUniversalActionResponseBuilder()
.setOpenLink(CardService.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 =
CardService.newUniversalActionResponseBuilder()
.displayAddOnCards([cardBuilder1.build(), cardBuilder2.build()])
.build();
तरीके
तरीका | रिटर्न टाइप | संक्षिप्त विवरण |
printJson() | String | इस ऑब्जेक्ट को JSON फ़ॉर्मैट में प्रिंट करता है. |
ज़्यादा जानकारी वाला दस्तावेज़
printJson()
इस ऑब्जेक्ट को JSON फ़ॉर्मैट में प्रिंट करता है. यह सिर्फ़ डीबग करने के लिए है.
वापसी का टिकट
String
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2024-12-21 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2024-12-21 (UTC) को अपडेट किया गया."],[[["`UniversalActionResponse` objects are returned from methods creating universal actions, like opening links or displaying cards."],["These objects can define actions like opening a web link using `setOpenLink()` or showing cards using `displayAddOnCards()`."],["For debugging, the `printJson()` method outputs the object's JSON representation as a string."]]],["The `UniversalActionResponse` object is used to define actions within a card-based interface. Key actions include using the `setOpenLink` method to open a URL and `displayAddOnCards` to display multiple static cards. `printJson()` is a method for debugging, that returns the JSON representation of the object as a string. These methods are used within the `UniversalActionResponseBuilder` to create the object.\n"]]