Class Card
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
כרטיס
כרטיס הקשר שמייצג תצוגה אחת בממשק המשתמש.
const cardSection = CardService.newCardSection();
// Finish building the card section ...
const card = CardService.newCardBuilder()
.setName('Card name')
.setHeader(CardService.newCardHeader().setTitle('Card title'))
.addSection(cardSection)
.build();
Methods
שיטה | סוג הערך המוחזר | תיאור קצר |
printJson() | String | הדפסת הייצוג של האובייקט הזה ב-JSON. |
מסמכים מפורטים
printJson()
הדפסת הייצוג של האובייקט הזה ב-JSON. האפשרות הזו מיועדת לניפוי באגים בלבד.
חזרה
String
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-26 (שעון UTC).
[null,null,["עדכון אחרון: 2025-07-26 (שעון UTC)."],[[["\u003cp\u003eCards provide single views in the UI and are built using sections.\u003c/p\u003e\n"],["\u003cp\u003eCards can have names, headers, and sections added.\u003c/p\u003e\n"],["\u003cp\u003eA \u003ccode\u003eprintJson()\u003c/code\u003e method is available for debugging the card's JSON representation.\u003c/p\u003e\n"]]],["A `Card` is a UI element representing a single view, built using `CardService`. The process involves creating a `CardSection`, then a `Card` builder. The builder sets the `Card`'s name, header, and adds the `CardSection`. Finally, the `Card` is built. The `printJson()` method returns a JSON string representation of the `Card` for debugging. This method is intended for debugging purposes only.\n"],null,["# Class Card\n\nCard\n\nA context [card](/gmail/add-ons/concepts/cards) that represents a single view in the\nUI.\n\n```javascript\nconst cardSection = CardService.newCardSection();\n// Finish building the card section ...\n\nconst card = CardService.newCardBuilder()\n .setName('Card name')\n .setHeader(CardService.newCardHeader().setTitle('Card title'))\n .addSection(cardSection)\n .build();\n``` \n\n### Methods\n\n| Method | Return type | Brief description |\n|-----------------------------|-------------|------------------------------------------------|\n| [printJson()](#printJson()) | `String` | Prints the JSON representation of this object. |\n\nDetailed documentation\n----------------------\n\n### `print``Json()`\n\nPrints the JSON representation of this object. This is for debugging only.\n\n#### Return\n\n\n`String`"]]