|
非推奨メンバー |
非推奨ポリシー |
2010/08/10 |
|
getSelfLink |
String |
この添付ファイル用のthe Google Data feedのUrlを取得する |
|
getContent |
String |
文字列としてのこの添付ファイルの内容(ホストされたファイルとして)またはファイルのUrl(ウェブ添付ファイとして)を取得する |
|
setContent |
Attachment |
文字列としてのこの添付ファイルの内容(ホストされたファイルとして)またはファイルのUrl(ウェブ添付ファイとして)を取得する |
method getLastUpdated()
| 戻り値 : |
| Type | 説明 |
|
Date |
この添付ファイルの最終更新日
|
| サンプル : |
var pages = SitesApp.getSite('example.com', 'mysite').getChildren();
var attachments = pages[0].getAttachments();
var date = attachments[0].getLastUpdated();
|
method getDatePublished()
| Arguments : |
| name | Type | 説明 |
|
name | String |
フォルダー名 |
| 戻り値 : |
| Type | 説明 |
|
Date |
添付ファイルがオリジナルとして公開された日付
|
| サンプル : |
var pages = SitesApp.getSite('example.com', 'mysite').getChildren();
var attachments = pages[0].getAttachments();
var date = attachments[0].getDatePublished();
|
method getParent()
| 戻り値 : |
| Type | 説明 |
|
Page |
DocsList内のすべてのファイル
|
| サンプル : |
var pages = SitesApp.getSite('example.com', 'mysite').getChildren();
var attachments = pages[0].getAttachments();
var date = attachments[0].getParent();
|
method setParent(parent)
| Arguments : |
| name | Type | 説明 |
|
parent | Page |
この添付ファイルの親ページ |
| サンプル : |
var site = SitesApp.getSite('example.com', 'mysite');
var attachments = site.getChildren()[0].getAttachments();
var newParent = site.getChildByName('childpage2');
for (var i = 0; i < attachments.length; i++) {
var attachment = attachments[i].setParent(newParent);
}
|
method getDescription()
| 戻り値 : |
| Type | 説明 |
|
String |
この添付ファイルの説明
|
| サンプル : |
var pages = SitesApp.getSite('example.com', 'mysite').getChildren();
var attachments = pages[0].getAttachments();
var desc = attachments[0].getDescription();
|
method setDescription(description)
| Arguments : |
| name | Type | 説明 |
|
description | String |
この添付ファイルの新しい説明 |
| サンプル : |
var pages = SitesApp.getSite('example.com', 'mysite').getChildren();
var attachments = pages[0].getAttachments();
var att = attachments[0].setDescription('new description');
|
method getTitle()
| 戻り値 : |
| Type | 説明 |
|
String |
この添付ファイルのタイトル
|
| サンプル : |
var pages = SitesApp.getSite('example.com', 'mysite').getChildren();
var attachments = pages[0].getAttachments();
var title = attachments[0].getTitle();
|
method setTitle(title)
| Arguments : |
| name | Type | 説明 |
|
Title | String |
この添付ファイルの新しいタイトル |
| サンプル : |
var pages = SitesApp.getSite('example.com', 'mysite').getChildren();
var attachments = pages[0].getAttachments();
var att = attachments[0].setTitle('new title');
|
method getUrl()
| 戻り値 : |
| Type | 説明 |
|
String |
この添付ファイルのURL
|
| サンプル : |
var pages = SitesApp.getSite('example.com', 'mysite').getChildren();
var attachments = pages[0].getAttachments();
var url = attachments[0].getUrl();
|
method getAttachmentType()
-
この添付ファイルのタイプを取得する(HOSTED or WEB)
| サンプル : |
var pages = SitesApp.getSite('example.com', 'mysite').getChildren();
var attachments = pages[0].getAttachments();
var attType = attachments[0].getAttachmentType();
|
method deleteAttachment()
| サンプル : |
var pages = SitesApp.getSite('example.com', 'mysite').getChildren();
var attachments = pages[0].getAttachments();
attachments[0].deleteAttachment();
|
method getBlob()
-
この添付ファイルを含むBlobオブジェクトを取得する
| 戻り値 : |
| Type | 説明 |
|
getBlob |
この添付ファイルデータのコピーを持つBlob
|
| サンプル : |
var pages = SitesApp.getSite('example.com', 'mysite').getChildren();
var attachments = pages[0].getAttachments();
var attData = attachments[0].getBlob();
|
method getContentType()
| 戻り値 : |
| Type | 説明 |
|
String |
この添付ファイルのmime type
|
| サンプル : |
var pages = SitesApp.getSite('example.com', 'mysite').getChildren();
var attachments = pages[0].getAttachments();
var contentType = attachments[0].getContentType();
|
method setContentType()
| Arguments : |
| name | Type | 説明 |
|
contentType | String |
この添付ファイルの新しいContentType |
| サンプル : |
var pages = SitesApp.getSite('example.com', 'mysite').getChildren();
var attachments = pages[0].getAttachments();
var att = attachments[0].setContentType('text/html');
|
method setFrom(blob)
-
Blobからデータ、content type、添付ファイル名を設定する:ウェブの添付ファイルの例外をスローする
( 参考 :getBlob)
| Arguments : |
| name | Type | 説明 |
|
blob | Blob |
この添付ファイルのデータをセットするためのBlob |
method setUrl(url)
-
この添付ファイルのUrlを設定する:ホストされた添付ファイルの例外をスローする
( 参考 :getUrl)
| Arguments : |
| name | Type | 説明 |
|
url | String |
この添付ファイルの新しいUrl |
|