부가기능에서 만든 첨부파일을 나타냅니다. 이는 다양한 Google 확장 제품의 컨텍스트 내에서 캘린더 일정과 같은 새 첨부파일을 생성하는 데 사용할 수 있습니다.
var attachment = CardService.newAttachment() .setResourceUrl("https://fakeresourceurl.com") .setTitle("Attachment title") .setMimeType("text/html") .setIconUrl("https://fakeresourceurl.com/iconurl.png");
방법
메서드 | 반환 유형 | 간략한 설명 |
---|---|---|
setIconUrl(iconUrl) | Attachment | 첨부파일의 아이콘 URL을 설정합니다. |
setMimeType(mimeType) | Attachment | 첨부파일의 MIME 유형을 설정합니다. |
setResourceUrl(resourceUrl) | Attachment | 연결의 리소스 URL을 설정합니다. |
setTitle(title) | Attachment | 첨부파일의 제목을 설정합니다. |
자세한 문서
setIconUrl(iconUrl)
setMimeType(mimeType)
첨부파일의 MIME 유형을 설정합니다.
매개변수
이름 | 유형 | 설명 |
---|---|---|
mimeType | String | 첨부파일 리소스에 있는 콘텐츠의 MIME 유형입니다. |
리턴
Attachment
- 체이닝용 객체입니다.