代表外掛程式建立的附件。您可在不同的 Google 擴充功能產品中使用該功能來產生新的附件 (例如日曆活動)。
var attachment = CardService.newAttachment() .setResourceUrl("https://fakeresourceurl.com") .setTitle("Attachment title") .setMimeType("text/html") .setIconUrl("https://fakeresourceurl.com/iconurl.png");
方法
方法 | 傳回類型 | 簡短說明 |
---|---|---|
setIconUrl(iconUrl) | Attachment | 設定附件的圖示網址。 |
setMimeType(mimeType) | Attachment | 設定附件的 MIME 類型。 |
setResourceUrl(resourceUrl) | Attachment | 設定連結的資源網址。 |
setTitle(title) | Attachment | 設定附件的標題。 |