Paragrafı temsil eden bir öğe. Paragraph öğesi Equation, Footnote, Horizontal, Inline, Inline, Page ve Text öğelerini içerebilir. Belge yapısı hakkında daha fazla bilgi için Google Dokümanlar'ı genişletme rehberine bakın.
Paragraphs yeni satır karakterleri içeremez. Yeni satır karakterleri ("\n") satır sonu karakterlerine ("\r") dönüştürülür.
const body = DocumentApp.getActiveDocument().getActiveTab().asDocumentTab().getBody(); // Append a tab header paragraph. const header = body.appendParagraph('A Document'); header.setHeading(DocumentApp.ParagraphHeading.HEADING1); // Append a section header paragraph. const section = body.appendParagraph('Section 1'); section.setHeading(DocumentApp.ParagraphHeading.HEADING2); // Append a regular paragraph. body.appendParagraph('This is a typical paragraph.');
Yöntemler
| Yöntem | Dönüş türü | Kısa açıklama |
|---|---|---|
add | Positioned | Belirtilen resim blob'undan yeni bir Positioned oluşturup ekler. |
append | Horizontal | Yeni bir Horizontal oluşturur ve ekler. |
append | Inline | Belirtilen resim blob'undan yeni bir Inline oluşturur ve ekler. |
append | Inline | Belirtilen Inline eklenir. |
append | Page | Yeni bir Page oluşturur ve ekler. |
append | Page | Belirtilen Page eklenir. |
append | Text | Belirtilen içeriklerle yeni bir Text öğesi oluşturur ve ekler. |
append | Text | Belirtilen Text öğesini ekler. |
clear() | Paragraph | Öğenin içeriğini temizler. |
copy() | Paragraph | Geçerli öğenin ayrılmış, derin bir kopyasını döndürür. |
edit | Text | Düzenlemek için mevcut öğenin Text sürümünü alır. |
find | Range | Öğenin içeriğinde, belirtilen türde bir alt öğe arar. |
find | Range | Belirtilen Range ile başlayarak, belirtilen türde bir alt öğe için öğenin içeriğini arar. |
find | Range | Normal ifadeleri kullanarak öğenin içeriğinde belirtilen metin kalıbını arar. |
find | Range | Belirtilen metin kalıbını, belirli bir arama sonucundan başlayarak öğenin içeriğinde arar. |
get | Horizontal | Horizontal öğesini alır. |
get | Object | Öğenin özelliklerini alır. |
get | Element | Belirtilen alt dizindeki alt öğeyi alır. |
get | Integer | Belirtilen alt öğenin alt dizinini alır. |
get | Paragraph | Paragraph öğesini alır. |
get | Number|null | Son girintiyi puan cinsinden alır. |
get | Number|null | İlk satır girintisini puan cinsinden alır. |
get | Number|null | Başlangıç girintisini alır. |
get | Number|null | Satır aralığını puan cinsinden alır. |
get | String|null | Bağlantı URL'sini alır. |
get | Element|null | Öğenin sonraki kardeş öğesini alır. |
get | Integer | Çocuk sayısını alır. |
get | Container | Öğenin üst öğesini alır. |
get | Positioned | Görüntünün kimliğine göre Positioned alır. |
get | Positioned | Paragrafa sabitlenmiş tüm Positioned nesnelerini alır. |
get | Element|null | Öğenin önceki kardeş öğesini alır. |
get | Number|null | Öğeden sonraki aralığı punto cinsinden alır. |
get | Number|null | Öğeden önceki aralığı punto cinsinden alır. |
get | String | Öğenin içeriğini metin dizesi olarak alır. |
get | Text | Metin hizalamasını alır. |
get | Element | Öğenin Element değerini alır. |
insert | Horizontal | Belirtilen dizinde bir Horizontal oluşturur ve ekler. |
insert | Inline | Belirtilen resim blob'undan belirtilen dizinde yeni bir Inline oluşturup ekler. |
insert | Inline | Belirtilen dizine verilen Inline öğesini ekler. |
insert | Page | Belirtilen dizinde yeni bir Page oluşturur ve ekler. |
insert | Page | Belirtilen dizine verilen Page öğesini ekler. |
insert | Text | Belirtilen dizinde yeni bir metin öğesi oluşturur ve ekler. |
insert | Text | Belirtilen Text öğesini, belirtilen metin içerikleriyle birlikte belirtilen dizine ekler. |
is | Boolean | Öğenin Document sonunda olup olmadığını belirler. |
is | Boolean|null | Soldan sağa ayarını alır. |
merge() | Paragraph|null | Öğeyi, aynı türdeki önceki kardeş öğeyle birleştirir. |
remove | Paragraph | Belirtilen alt öğeyi kaldırır. |
remove | Paragraph|null | Öğeyi üst öğesinden kaldırır. |
remove | Boolean | Resmin kimliğine göre Positioned kaldırır. |
replace | Element | Normal ifadeleri kullanarak belirli bir metin kalıbının tüm örneklerini belirli bir yeni dizeyle değiştirir. |
set | Paragraph | Horizontal değerini ayarlar. |
set | Paragraph | Öğenin özelliklerini ayarlar. |
set | Paragraph | Paragraph değerini ayarlar. |
set | Paragraph | Bitiş girintisini puan cinsinden ayarlar. |
set | Paragraph | İlk satır girintisini puan cinsinden ayarlar. |
set | Paragraph | Başlangıç girintisini puan cinsinden ayarlar. |
set | Paragraph | Soldan sağa ayarını belirler. |
set | Paragraph | Satır aralığını, aralık için kullanılacak satır sayısını belirten bir miktar olarak ayarlar. |
set | Paragraph | Bağlantı URL'sini ayarlar. |
set | Paragraph | Öğeden sonraki aralığı punto cinsinden ayarlar. |
set | Paragraph | Öğeden önceki aralığı punto cinsinden ayarlar. |
set | void | Paragrafın içeriğini metin olarak ayarlar. |
set | Paragraph | Metin hizalamasını ayarlar. |
Ayrıntılı belgeler
add Positioned Image(image)
Belirtilen resim blob'undan yeni bir Positioned oluşturup ekler.
// Opens the Docs file by its ID. If you created your script from within // a Google Docs file, you can use DocumentApp.getActiveDocument() instead. // TODO(developer): Replace the ID with your own. const doc = DocumentApp.openById('123abc'); // Gets the body contents of the tab by its ID. // TODO(developer): Replace the ID with your own. const body = doc.getTab('123abc').asDocumentTab().getBody(); // Gets the first paragraph from the body. const paragraph = body.getParagraphs()[0]; // Fetches the specified image URL. const image = UrlFetchApp.fetch( 'https://fonts.gstatic.com/s/i/productlogos/apps_script/v10/web-24dp/logo_apps_script_color_1x_web_24dp.png', ); // Adds the image to the tab, anchored to the first paragraph. paragraph.addPositionedImage(image);
Parametreler
| Ad | Tür | Açıklama |
|---|---|---|
image | Blob | Resim verileri. |
Return
Positioned: Yeni konumlandırılmış resim.
Yetkilendirme
Bu yöntemi kullanan komut dosyaları, aşağıdaki kapsamlardan biri veya daha fazlasıyla yetkilendirme gerektirir:
-
https://www.googleapis.com/auth/documents.currentonly -
https://www.googleapis.com/auth/documents
append Horizontal Rule()
Yeni bir Horizontal oluşturur ve ekler.
// Opens the Docs file by its ID. If you created your script from within // a Google Docs file, you can use DocumentApp.getActiveDocument() instead. // TODO(developer): Replace the ID with your own. const doc = DocumentApp.openById('123abc'); // Gets the body contents of the tab by its ID. // TODO(developer): Replace the ID with your own. const body = doc.getTab('123abc').asDocumentTab().getBody(); // Gets the first paragraph from the body. const paragraph = body.getParagraphs()[0]; // Adds a horizontal line under the first paragraph. paragraph.appendHorizontalRule();
Return
Horizontal — Yeni yatay kural.
Yetkilendirme
Bu yöntemi kullanan komut dosyaları, aşağıdaki kapsamlardan biri veya daha fazlasıyla yetkilendirme gerektirir:
-
https://www.googleapis.com/auth/documents.currentonly -
https://www.googleapis.com/auth/documents
append Inline Image(image)
Belirtilen resim blob'undan yeni bir Inline oluşturur ve ekler.
// Opens the Docs file by its ID. If you created your script from within // a Google Docs file, you can use DocumentApp.getActiveDocument() instead. // TODO(developer): Replace the ID with your own. const doc = DocumentApp.openById('123abc'); // Gets the body contents of the tab by its ID. // TODO(developer): Replace the ID with your own. const body = doc.getTab('123abc').asDocumentTab().getBody(); // Gets the first paragraph from the body. const paragraph = body.getParagraphs()[0]; // Fetches the image from the specified image URL. const image = UrlFetchApp.fetch( 'https://fonts.gstatic.com/s/i/productlogos/apps_script/v10/web-96dp/logo_apps_script_color_1x_web_96dp.png', ); // Adds the image to the first paragraph. paragraph.appendInlineImage(image);
Parametreler
| Ad | Tür | Açıklama |
|---|---|---|
image | Blob | Resim verileri. |
Return
Inline: Eklenen resim.
Yetkilendirme
Bu yöntemi kullanan komut dosyaları, aşağıdaki kapsamlardan biri veya daha fazlasıyla yetkilendirme gerektirir:
-
https://www.googleapis.com/auth/documents.currentonly -
https://www.googleapis.com/auth/documents
append Inline Image(image)
Belirtilen Inline eklenir.
// Opens the Docs file by its ID. If you created your script from within // a Google Docs file, you can use DocumentApp.getActiveDocument() instead. // TODO(developer): Replace the ID with your own. const doc = DocumentApp.openById('123abc'); // Gets the body contents of the tab by its ID. // TODO(developer): Replace the ID with your own. const body = doc.getTab('123abc').asDocumentTab().getBody(); // Gets the first paragraph from the body. const paragraph = body.getParagraphs()[0]; // Makes a copy of the first image in the body. const image = body.getImages()[0].copy(); // Adds the image to the first paragraph. paragraph.appendInlineImage(image);
Parametreler
| Ad | Tür | Açıklama |
|---|---|---|
image | Inline | Resim verileri. |
Return
Inline: Eklenen resim.
Yetkilendirme
Bu yöntemi kullanan komut dosyaları, aşağıdaki kapsamlardan biri veya daha fazlasıyla yetkilendirme gerektirir:
-
https://www.googleapis.com/auth/documents.currentonly -
https://www.googleapis.com/auth/documents
append Page Break()
Yeni bir Page oluşturur ve ekler.
Not: Page, Table içinde yer almayabilir.
Mevcut öğe bir tablo hücresinde yer alıyorsa istisna oluşturulur.
// Opens the Docs file by its ID. If you created your script from within // a Google Docs file, you can use DocumentApp.getActiveDocument() instead. // TODO(developer): Replace the ID with your own. const doc = DocumentApp.openById('123abc'); // Gets the body contents of the tab by its ID. // TODO(developer): Replace the ID with your own. const body = doc.getTab('123abc').asDocumentTab().getBody(); // Gets the first paragraph from the body. const paragraph = body.getParagraphs()[0]; // Adds a page break after the first paragraph. paragraph.appendPageBreak();
Return
Page: Yeni sayfa sonu öğesi.
Yetkilendirme
Bu yöntemi kullanan komut dosyaları, aşağıdaki kapsamlardan biri veya daha fazlasıyla yetkilendirme gerektirir:
-
https://www.googleapis.com/auth/documents.currentonly -
https://www.googleapis.com/auth/documents
append Page Break(pageBreak)
Belirtilen Page eklenir.
Not: Page, Table içinde yer alamaz.
Mevcut öğe bir tablo hücresinde bulunuyorsa komut dosyası istisna oluşturur.
// Opens the Docs file by its ID. If you created your script from within // a Google Docs file, you can use DocumentApp.getActiveDocument() instead. // TODO(developer): Replace the ID with your own. const doc = DocumentApp.openById('123abc'); // Gets the body contents of the tab by its ID. // TODO(developer): Replace the ID with your own. const body = doc.getTab('123abc').asDocumentTab().getBody(); // Gets the first paragraph from the body. const paragraph = body.getParagraphs()[0]; // Adds a page break after the first paragraph. const pageBreak = paragraph.appendPageBreak(); // Makes a copy of the page break. const newPageBreak = pageBreak.copy(); // Adds the copied page break to the paragraph. paragraph.appendPageBreak(newPageBreak);
Parametreler
| Ad | Tür | Açıklama |
|---|---|---|
page | Page | Eklenecek sayfa sonu. |
Return
Page: Eklenen sayfa sonu öğesi.
Yetkilendirme
Bu yöntemi kullanan komut dosyaları, aşağıdaki kapsamlardan biri veya daha fazlasıyla yetkilendirme gerektirir:
-
https://www.googleapis.com/auth/documents.currentonly -
https://www.googleapis.com/auth/documents
append Text(text)
Belirtilen içeriklerle yeni bir Text öğesi oluşturur ve ekler.
// Opens the Docs file by its ID. If you created your script from within // a Google Docs file, you can use DocumentApp.getActiveDocument() instead. // TODO(developer): Replace the ID with your own. const doc = DocumentApp.openById('123abc'); // Gets the body contents of the tab by its ID. // TODO(developer): Replace the ID with your own. const body = doc.getTab('123abc').asDocumentTab().getBody(); // Gets the first paragraph from the body. const paragraph = body.getParagraphs()[0]; // Adds a string to the paragraph. paragraph.appendText('This is a new sentence.');
Parametreler
| Ad | Tür | Açıklama |
|---|---|---|
text | String | Metin içerikleri. |
Return
Text: Yeni metin öğesi.
Yetkilendirme
Bu yöntemi kullanan komut dosyaları, aşağıdaki kapsamlardan biri veya daha fazlasıyla yetkilendirme gerektirir:
-
https://www.googleapis.com/auth/documents.currentonly -
https://www.googleapis.com/auth/documents
append Text(text)
Belirtilen Text öğesini ekler.
// Opens the Docs file by its ID. If you created your script from within // a Google Docs file, you can use DocumentApp.getActiveDocument() instead. // TODO(developer): Replace the ID with your own. const doc = DocumentApp.openById('123abc'); // Gets the body contents of the tab by its ID. // TODO(developer): Replace the ID with your own. const body = doc.getTab('123abc').asDocumentTab().getBody(); // Gets the text from the first paragraph in the body. const paragraph1 = body.getParagraphs()[0]; const text = paragraph1.getText(); // Gets the third paragraph in the body. const paragraph3 = body.getParagraphs()[2]; // Adds the text from the first paragraph to the third paragraph. paragraph3.appendText(text);
Parametreler
| Ad | Tür | Açıklama |
|---|---|---|
text | Text | Eklenecek metin öğesi. |
Return
Text: Eklenen metin öğesi.
Yetkilendirme
Bu yöntemi kullanan komut dosyaları, aşağıdaki kapsamlardan biri veya daha fazlasıyla yetkilendirme gerektirir:
-
https://www.googleapis.com/auth/documents.currentonly -
https://www.googleapis.com/auth/documents
clear()
copy()
Geçerli öğenin ayrılmış, derin bir kopyasını döndürür.
Öğede bulunan tüm alt öğeler de kopyalanır. Yeni öğenin üst öğesi yok.
Return
Paragraph: Yeni kopya.
Yetkilendirme
Bu yöntemi kullanan komut dosyaları, aşağıdaki kapsamlardan biri veya daha fazlasıyla yetkilendirme gerektirir:
-
https://www.googleapis.com/auth/documents.currentonly -
https://www.googleapis.com/auth/documents
edit As Text()
Düzenlemek için mevcut öğenin Text sürümünü alır.
Öğelerin içeriğini zengin metin olarak değiştirmek için edit kullanın. edit modu, metin olmayan öğeleri (ör. Inline ve Horizontal) yoksayar.
Silinen bir metin aralığında tamamen yer alan alt öğeler, öğeden kaldırılır.
const body = DocumentApp.getActiveDocument().getActiveTab().asDocumentTab().getBody(); // Insert two paragraphs separated by a paragraph containing an // horizontal rule. body.insertParagraph(0, 'An editAsText sample.'); body.insertHorizontalRule(0); body.insertParagraph(0, 'An example.'); // Delete " sample.\n\n An" removing the horizontal rule in the process. body.editAsText().deleteText(14, 25);
Return
Text: Geçerli öğenin metin sürümü
find Element(elementType)
Öğenin içeriğinde, belirtilen türde bir alt öğe arar.
Parametreler
| Ad | Tür | Açıklama |
|---|---|---|
element | Element | Aranacak öğe türü. |
Return
Range: Arama öğesinin konumunu gösteren bir arama sonucu.
Yetkilendirme
Bu yöntemi kullanan komut dosyaları, aşağıdaki kapsamlardan biri veya daha fazlasıyla yetkilendirme gerektirir:
-
https://www.googleapis.com/auth/documents.currentonly -
https://www.googleapis.com/auth/documents
find Element(elementType, from)
Belirtilen Range ile başlayarak, belirtilen türde bir alt öğe için öğenin içeriğini arar.
const body = DocumentApp.getActiveDocument().getActiveTab().asDocumentTab().getBody(); // Define the search parameters. let searchResult = null; // Search until the paragraph is found. while ( (searchResult = body.findElement( DocumentApp.ElementType.PARAGRAPH, searchResult, ))) { const par = searchResult.getElement().asParagraph(); if (par.getHeading() === DocumentApp.ParagraphHeading.HEADING1) { // Found one, update and stop. par.setText('This is the first header.'); break; } }
Parametreler
| Ad | Tür | Açıklama |
|---|---|---|
element | Element | Aranacak öğe türü. |
from | Range | Arama yapılacak arama sonucu. |
Return
Range: Arama öğesinin sonraki konumunu gösteren bir arama sonucu.
Yetkilendirme
Bu yöntemi kullanan komut dosyaları, aşağıdaki kapsamlardan biri veya daha fazlasıyla yetkilendirme gerektirir:
-
https://www.googleapis.com/auth/documents.currentonly -
https://www.googleapis.com/auth/documents
find Text(searchPattern)
Normal ifadeleri kullanarak öğenin içeriğinde belirtilen metin kalıbını arar.
JavaScript normal ifade özelliklerinin bir alt kümesi (ör. yakalama grupları ve mod değiştiriciler) tam olarak desteklenmez.
Sağlanan normal ifade kalıbı, mevcut öğede bulunan her metin bloğuyla bağımsız olarak eşleştirilir.
Parametreler
| Ad | Tür | Açıklama |
|---|---|---|
search | String | Aranacak desen |
Return
Range — arama metninin konumunu gösteren bir arama sonucu veya eşleşme yoksa null
Yetkilendirme
Bu yöntemi kullanan komut dosyaları, aşağıdaki kapsamlardan biri veya daha fazlasıyla yetkilendirme gerektirir:
-
https://www.googleapis.com/auth/documents.currentonly -
https://www.googleapis.com/auth/documents
find Text(searchPattern, from)
Belirtilen metin kalıbını, belirli bir arama sonucundan başlayarak öğenin içeriğinde arar.
JavaScript normal ifade özelliklerinin bir alt kümesi (ör. yakalama grupları ve mod değiştiriciler) tam olarak desteklenmez.
Sağlanan normal ifade kalıbı, mevcut öğede bulunan her metin bloğuyla bağımsız olarak eşleştirilir.
Parametreler
| Ad | Tür | Açıklama |
|---|---|---|
search | String | Aranacak desen |
from | Range | Arama yapılacak arama sonucu |
Return
Range: Arama metninin bir sonraki konumunu gösteren bir arama sonucu veya eşleşme yoksa null
Yetkilendirme
Bu yöntemi kullanan komut dosyaları, aşağıdaki kapsamlardan biri veya daha fazlasıyla yetkilendirme gerektirir:
-
https://www.googleapis.com/auth/documents.currentonly -
https://www.googleapis.com/auth/documents
get Alignment()
Horizontal öğesini alır.
// Opens the Docs file by its ID. If you created your script from within // a Google Docs file, you can use DocumentApp.getActiveDocument() instead. // TODO(developer): Replace the ID with your own. const doc = DocumentApp.openById('123abc'); // Gets the body contents of the tab by its ID. // TODO(developer): Replace the ID with your own. const body = doc.getTab('123abc').asDocumentTab().getBody(); // Gets the first paragraph from the body. const paragraph = body.getParagraphs()[0]; // Sets the horizontal alignment to left for the first paragraph. paragraph.setAlignment(DocumentApp.HorizontalAlignment.LEFT); // Gets the horizontal alignment of the first paragraph and logs it to the // console. console.log(paragraph.getAlignment().toString());
Return
Horizontal — Eşleşme.
Yetkilendirme
Bu yöntemi kullanan komut dosyaları, aşağıdaki kapsamlardan biri veya daha fazlasıyla yetkilendirme gerektirir:
-
https://www.googleapis.com/auth/documents.currentonly -
https://www.googleapis.com/auth/documents
get Attributes()
Öğenin özelliklerini alır.
Sonuç, her geçerli öğe özelliği için bir özellik içeren bir nesnedir. Her özellik adı, Document numaralandırmasındaki bir öğeye karşılık gelir.
const doc = DocumentApp.getActiveDocument(); const documentTab = doc.getActiveTab().asDocumentTab(); const body = documentTab.getBody(); // Append a styled paragraph. const par = body.appendParagraph('A bold, italicized paragraph.'); par.setBold(true); par.setItalic(true); // Retrieve the paragraph's attributes. const atts = par.getAttributes(); // Log the paragraph attributes. for (const att in atts) { Logger.log(`${att}:${atts[att]}`); }
Return
Object: Öğenin özellikleri.
Yetkilendirme
Bu yöntemi kullanan komut dosyaları, aşağıdaki kapsamlardan biri veya daha fazlasıyla yetkilendirme gerektirir:
-
https://www.googleapis.com/auth/documents.currentonly -
https://www.googleapis.com/auth/documents
get Child(childIndex)
Belirtilen alt dizindeki alt öğeyi alır.
const body = DocumentApp.getActiveDocument().getActiveTab().asDocumentTab().getBody(); // Obtain the first element in the tab. const firstChild = body.getChild(0); // If it's a paragraph, set its contents. if (firstChild.getType() === DocumentApp.ElementType.PARAGRAPH) { firstChild.asParagraph().setText('This is the first paragraph.'); }
Parametreler
| Ad | Tür | Açıklama |
|---|---|---|
child | Integer | Alınacak alt öğenin dizini. |
Return
Element: Belirtilen dizindeki alt öğe.
Yetkilendirme
Bu yöntemi kullanan komut dosyaları, aşağıdaki kapsamlardan biri veya daha fazlasıyla yetkilendirme gerektirir:
-
https://www.googleapis.com/auth/documents.currentonly -
https://www.googleapis.com/auth/documents
get Child Index(child)
Belirtilen alt öğenin alt dizinini alır.
Parametreler
| Ad | Tür | Açıklama |
|---|---|---|
child | Element | Dizinin alınacağı alt öğe. |
Return
Integer: Çocuk dizini.
Yetkilendirme
Bu yöntemi kullanan komut dosyaları, aşağıdaki kapsamlardan biri veya daha fazlasıyla yetkilendirme gerektirir:
-
https://www.googleapis.com/auth/documents.currentonly -
https://www.googleapis.com/auth/documents
get Heading()
Paragraph öğesini alır.
// Opens the Docs file by its ID. If you created your script from within // a Google Docs file, you can use DocumentApp.getActiveDocument() instead. // TODO(developer): Replace the ID with your own. const doc = DocumentApp.openById('123abc'); // Gets the body contents of the tab by its ID. // TODO(developer): Replace the ID with your own. const body = doc.getTab('123abc').asDocumentTab().getBody(); // Adds a paragraph to the body. const paragraph = body.appendParagraph('Title heading'); // Sets the paragraph heading style to 'Title.' paragraph.setHeading(DocumentApp.ParagraphHeading.TITLE); // Gets the heading style and logs it to the console. console.log(paragraph.getHeading().toString());
Return
Paragraph: Başlık.
Yetkilendirme
Bu yöntemi kullanan komut dosyaları, aşağıdaki kapsamlardan biri veya daha fazlasıyla yetkilendirme gerektirir:
-
https://www.googleapis.com/auth/documents.currentonly -
https://www.googleapis.com/auth/documents
get Indent End()
Son girintiyi puan cinsinden alır.
Return
Number|null: Bitiş girintisi (puan cinsinden)
Yetkilendirme
Bu yöntemi kullanan komut dosyaları, aşağıdaki kapsamlardan biri veya daha fazlasıyla yetkilendirme gerektirir:
-
https://www.googleapis.com/auth/documents.currentonly -
https://www.googleapis.com/auth/documents
get Indent First Line()
İlk satır girintisini puan cinsinden alır.
Return
Number|null: İlk satır girintisi (puan cinsinden)
Yetkilendirme
Bu yöntemi kullanan komut dosyaları, aşağıdaki kapsamlardan biri veya daha fazlasıyla yetkilendirme gerektirir:
-
https://www.googleapis.com/auth/documents.currentonly -
https://www.googleapis.com/auth/documents
get Indent Start()
Başlangıç girintisini alır.
Return
Number|null: Başlangıç girintisi
Yetkilendirme
Bu yöntemi kullanan komut dosyaları, aşağıdaki kapsamlardan biri veya daha fazlasıyla yetkilendirme gerektirir:
-
https://www.googleapis.com/auth/documents.currentonly -
https://www.googleapis.com/auth/documents
get Line Spacing()
Satır aralığını puan cinsinden alır.
Return
Number|null: Satır aralığı (punto cinsinden)
Yetkilendirme
Bu yöntemi kullanan komut dosyaları, aşağıdaki kapsamlardan biri veya daha fazlasıyla yetkilendirme gerektirir:
-
https://www.googleapis.com/auth/documents.currentonly -
https://www.googleapis.com/auth/documents
get Link Url()
Bağlantı URL'sini alır.
Return
String|null: Bağlantı URL'si veya öğe bu özellik için birden fazla değer içeriyorsa null
Yetkilendirme
Bu yöntemi kullanan komut dosyaları, aşağıdaki kapsamlardan biri veya daha fazlasıyla yetkilendirme gerektirir:
-
https://www.googleapis.com/auth/documents.currentonly -
https://www.googleapis.com/auth/documents
get Next Sibling()
Öğenin sonraki kardeş öğesini alır.
Bir sonraki kardeş öğe, aynı üst öğeye sahiptir ve geçerli öğeyi takip eder.
Return
Element|null: Sonraki kardeş öğe.
Yetkilendirme
Bu yöntemi kullanan komut dosyaları, aşağıdaki kapsamlardan biri veya daha fazlasıyla yetkilendirme gerektirir:
-
https://www.googleapis.com/auth/documents.currentonly -
https://www.googleapis.com/auth/documents
get Num Children()
Çocuk sayısını alır.
const body = DocumentApp.getActiveDocument().getActiveTab().asDocumentTab().getBody(); // Log the number of elements in the tab. Logger.log(`There are ${body.getNumChildren()} elements in the tab's body.`);
Return
Integer: Çocuk sayısı.
Yetkilendirme
Bu yöntemi kullanan komut dosyaları, aşağıdaki kapsamlardan biri veya daha fazlasıyla yetkilendirme gerektirir:
-
https://www.googleapis.com/auth/documents.currentonly -
https://www.googleapis.com/auth/documents
get Parent()
Öğenin üst öğesini alır.
Üst öğe, geçerli öğeyi içerir.
Return
Container: Üst öğe.
Yetkilendirme
Bu yöntemi kullanan komut dosyaları, aşağıdaki kapsamlardan biri veya daha fazlasıyla yetkilendirme gerektirir:
-
https://www.googleapis.com/auth/documents.currentonly -
https://www.googleapis.com/auth/documents
get Positioned Image(id)
Görüntünün kimliğine göre Positioned alır.
Parametreler
| Ad | Tür | Açıklama |
|---|---|---|
id | String | Resim kimliği |
Return
Positioned: Konumlandırılmış resim
Yetkilendirme
Bu yöntemi kullanan komut dosyaları, aşağıdaki kapsamlardan biri veya daha fazlasıyla yetkilendirme gerektirir:
-
https://www.googleapis.com/auth/documents.currentonly -
https://www.googleapis.com/auth/documents
get Positioned Images()
Paragrafa sabitlenmiş tüm Positioned nesnelerini alır.
Return
Positioned: Konumlandırılmış resimlerin listesi
Yetkilendirme
Bu yöntemi kullanan komut dosyaları, aşağıdaki kapsamlardan biri veya daha fazlasıyla yetkilendirme gerektirir:
-
https://www.googleapis.com/auth/documents.currentonly -
https://www.googleapis.com/auth/documents
get Previous Sibling()
Öğenin önceki kardeş öğesini alır.
Önceki kardeş öğe, aynı üst öğeye sahiptir ve geçerli öğeden önce gelir.
Return
Element|null: Önceki kardeş öğe.
Yetkilendirme
Bu yöntemi kullanan komut dosyaları, aşağıdaki kapsamlardan biri veya daha fazlasıyla yetkilendirme gerektirir:
-
https://www.googleapis.com/auth/documents.currentonly -
https://www.googleapis.com/auth/documents
get Spacing After()
Öğeden sonraki aralığı punto cinsinden alır.
Return
Number|null: Öğeden sonraki aralık (punto cinsinden)
Yetkilendirme
Bu yöntemi kullanan komut dosyaları, aşağıdaki kapsamlardan biri veya daha fazlasıyla yetkilendirme gerektirir:
-
https://www.googleapis.com/auth/documents.currentonly -
https://www.googleapis.com/auth/documents
get Spacing Before()
Öğeden önceki aralığı punto cinsinden alır.
Return
Number|null: Öğeden önceki boşluk (punto cinsinden)
Yetkilendirme
Bu yöntemi kullanan komut dosyaları, aşağıdaki kapsamlardan biri veya daha fazlasıyla yetkilendirme gerektirir:
-
https://www.googleapis.com/auth/documents.currentonly -
https://www.googleapis.com/auth/documents
get Text()
Öğenin içeriğini metin dizesi olarak alır.
Return
String: Öğenin metin dizesi olarak içeriği
Yetkilendirme
Bu yöntemi kullanan komut dosyaları, aşağıdaki kapsamlardan biri veya daha fazlasıyla yetkilendirme gerektirir:
-
https://www.googleapis.com/auth/documents.currentonly -
https://www.googleapis.com/auth/documents
get Text Alignment()
Metin hizalamasını alır. Kullanılabilir hizalama türleri Document, Document ve Document'dir.
Return
Text: Metin hizalama türü veya metin birden fazla metin hizalama türü içeriyorsa ya da metin hizalama hiç ayarlanmamışsa null
Yetkilendirme
Bu yöntemi kullanan komut dosyaları, aşağıdaki kapsamlardan biri veya daha fazlasıyla yetkilendirme gerektirir:
-
https://www.googleapis.com/auth/documents.currentonly -
https://www.googleapis.com/auth/documents
get Type()
Öğenin Element değerini alır.
Belirli bir öğenin tam türünü belirlemek için get kullanın.
const doc = DocumentApp.getActiveDocument(); const documentTab = doc.getActiveTab().asDocumentTab(); const body = documentTab.getBody(); // Obtain the first element in the active tab's body. const firstChild = body.getChild(0); // Use getType() to determine the element's type. if (firstChild.getType() === DocumentApp.ElementType.PARAGRAPH) { Logger.log('The first element is a paragraph.'); } else { Logger.log('The first element is not a paragraph.'); }
Return
Element: Öğe türü.
Yetkilendirme
Bu yöntemi kullanan komut dosyaları, aşağıdaki kapsamlardan biri veya daha fazlasıyla yetkilendirme gerektirir:
-
https://www.googleapis.com/auth/documents.currentonly -
https://www.googleapis.com/auth/documents
insert Horizontal Rule(childIndex)
Belirtilen dizinde bir Horizontal oluşturur ve ekler.
Parametreler
| Ad | Tür | Açıklama |
|---|---|---|
child | Integer | öğenin ekleneceği dizin |
Return
Horizontal: Yeni yatay çizgi öğesi
Yetkilendirme
Bu yöntemi kullanan komut dosyaları, aşağıdaki kapsamlardan biri veya daha fazlasıyla yetkilendirme gerektirir:
-
https://www.googleapis.com/auth/documents.currentonly -
https://www.googleapis.com/auth/documents
insert Inline Image(childIndex, image)
Belirtilen resim blob'undan belirtilen dizinde yeni bir Inline oluşturup ekler.
Parametreler
| Ad | Tür | Açıklama |
|---|---|---|
child | Integer | öğenin ekleneceği dizin |
image | Blob | Resim verileri |
Return
Inline: Eklenen satır içi resim öğesi
Yetkilendirme
Bu yöntemi kullanan komut dosyaları, aşağıdaki kapsamlardan biri veya daha fazlasıyla yetkilendirme gerektirir:
-
https://www.googleapis.com/auth/documents.currentonly -
https://www.googleapis.com/auth/documents
insert Inline Image(childIndex, image)
Belirtilen dizine verilen Inline öğesini ekler.
Parametreler
| Ad | Tür | Açıklama |
|---|---|---|
child | Integer | öğenin ekleneceği dizin |
image | Inline | Resim verileri |
Return
Inline: Eklenen satır içi resim öğesi
Yetkilendirme
Bu yöntemi kullanan komut dosyaları, aşağıdaki kapsamlardan biri veya daha fazlasıyla yetkilendirme gerektirir:
-
https://www.googleapis.com/auth/documents.currentonly -
https://www.googleapis.com/auth/documents
insert Page Break(childIndex)
Belirtilen dizinde yeni bir Page oluşturur ve ekler.
Not: Page, Table içinde yer almayabilir.
Mevcut öğe bir tablo hücresinde yer alıyorsa istisna oluşturulur.
Parametreler
| Ad | Tür | Açıklama |
|---|---|---|
child | Integer | öğenin ekleneceği dizin |
Return
Page: Yeni sayfa sonu öğesi
Yetkilendirme
Bu yöntemi kullanan komut dosyaları, aşağıdaki kapsamlardan biri veya daha fazlasıyla yetkilendirme gerektirir:
-
https://www.googleapis.com/auth/documents.currentonly -
https://www.googleapis.com/auth/documents
insert Page Break(childIndex, pageBreak)
Belirtilen dizine verilen Page öğesini ekler.
Not: Page, Table içinde yer almayabilir.
Mevcut öğe bir tablo hücresinde yer alıyorsa istisna oluşturulur.
Parametreler
| Ad | Tür | Açıklama |
|---|---|---|
child | Integer | öğenin ekleneceği dizin |
page | Page | eklenecek sayfa sonu |
Return
Page: Eklenen sayfa sonu öğesi
Yetkilendirme
Bu yöntemi kullanan komut dosyaları, aşağıdaki kapsamlardan biri veya daha fazlasıyla yetkilendirme gerektirir:
-
https://www.googleapis.com/auth/documents.currentonly -
https://www.googleapis.com/auth/documents
insert Text(childIndex, text)
Belirtilen dizinde yeni bir metin öğesi oluşturur ve ekler.
Parametreler
| Ad | Tür | Açıklama |
|---|---|---|
child | Integer | öğenin ekleneceği dizin |
text | String | metin içerikleri |
Return
Text: Yeni metin öğesi
Yetkilendirme
Bu yöntemi kullanan komut dosyaları, aşağıdaki kapsamlardan biri veya daha fazlasıyla yetkilendirme gerektirir:
-
https://www.googleapis.com/auth/documents.currentonly -
https://www.googleapis.com/auth/documents
insert Text(childIndex, text)
Belirtilen Text öğesini, belirtilen metin içerikleriyle birlikte belirtilen dizine ekler.
Parametreler
| Ad | Tür | Açıklama |
|---|---|---|
child | Integer | öğenin ekleneceği dizin |
text | Text | Eklenecek metin öğesi |
Return
Text: Eklenen metin öğesi
Yetkilendirme
Bu yöntemi kullanan komut dosyaları, aşağıdaki kapsamlardan biri veya daha fazlasıyla yetkilendirme gerektirir:
-
https://www.googleapis.com/auth/documents.currentonly -
https://www.googleapis.com/auth/documents
is At Document End()
Öğenin Document sonunda olup olmadığını belirler.
Return
Boolean: Öğenin sekmenin sonunda olup olmadığı.
Yetkilendirme
Bu yöntemi kullanan komut dosyaları, aşağıdaki kapsamlardan biri veya daha fazlasıyla yetkilendirme gerektirir:
-
https://www.googleapis.com/auth/documents.currentonly -
https://www.googleapis.com/auth/documents
is Left To Right()
Soldan sağa ayarını alır.
Return
Boolean|null: Soldan sağa ayarı
Yetkilendirme
Bu yöntemi kullanan komut dosyaları, aşağıdaki kapsamlardan biri veya daha fazlasıyla yetkilendirme gerektirir:
-
https://www.googleapis.com/auth/documents.currentonly -
https://www.googleapis.com/auth/documents
merge()
Öğeyi, aynı türdeki önceki kardeş öğeyle birleştirir.
Yalnızca aynı Element öğeleri birleştirilebilir. Geçerli öğede bulunan tüm alt öğeler, önceki kardeş öğeye taşınır.
Mevcut öğe dokümandan kaldırılır.
const doc = DocumentApp.getActiveDocument(); const documentTab = doc.getActiveTab().asDocumentTab(); const body = documentTab.getBody(); // Example 1: Merge paragraphs // Append two paragraphs to the document's active tab. const par1 = body.appendParagraph('Paragraph 1.'); const par2 = body.appendParagraph('Paragraph 2.'); // Merge the newly added paragraphs into a single paragraph. par2.merge(); // Example 2: Merge table cells // Create a two-dimensional array containing the table's cell contents. const cells = [ ['Row 1, Cell 1', 'Row 1, Cell 2'], ['Row 2, Cell 1', 'Row 2, Cell 2'], ]; // Build a table from the array. const table = body.appendTable(cells); // Get the first row in the table. const row = table.getRow(0); // Get the two cells in this row. const cell1 = row.getCell(0); const cell2 = row.getCell(1); // Merge the current cell into its preceding sibling element. const merged = cell2.merge();
Return
Paragraph|null: Birleştirilmiş öğe.
Yetkilendirme
Bu yöntemi kullanan komut dosyaları, aşağıdaki kapsamlardan biri veya daha fazlasıyla yetkilendirme gerektirir:
-
https://www.googleapis.com/auth/documents.currentonly -
https://www.googleapis.com/auth/documents
remove Child(child)
Belirtilen alt öğeyi kaldırır.
Parametreler
| Ad | Tür | Açıklama |
|---|---|---|
child | Element | kaldırılacak alt öğe |
Return
Paragraph: Geçerli öğe
Yetkilendirme
Bu yöntemi kullanan komut dosyaları, aşağıdaki kapsamlardan biri veya daha fazlasıyla yetkilendirme gerektirir:
-
https://www.googleapis.com/auth/documents.currentonly -
https://www.googleapis.com/auth/documents
remove From Parent()
Öğeyi üst öğesinden kaldırır.
const doc = DocumentApp.getActiveDocument(); const documentTab = doc.getActiveTab().asDocumentTab(); const body = documentTab.getBody(); // Remove all images in the active tab's body. const imgs = body.getImages(); for (let i = 0; i < imgs.length; i++) { imgs[i].removeFromParent(); }
Return
Paragraph|null: Kaldırılan öğe.
Yetkilendirme
Bu yöntemi kullanan komut dosyaları, aşağıdaki kapsamlardan biri veya daha fazlasıyla yetkilendirme gerektirir:
-
https://www.googleapis.com/auth/documents.currentonly -
https://www.googleapis.com/auth/documents
remove Positioned Image(id)
Resmin kimliğine göre Positioned kaldırır.
Parametreler
| Ad | Tür | Açıklama |
|---|---|---|
id | String | Resim kimliği |
Return
Boolean Belirtilen resmin kaldırılıp kaldırılmadığı
Yetkilendirme
Bu yöntemi kullanan komut dosyaları, aşağıdaki kapsamlardan biri veya daha fazlasıyla yetkilendirme gerektirir:
-
https://www.googleapis.com/auth/documents.currentonly -
https://www.googleapis.com/auth/documents
replace Text(searchPattern, replacement)
Normal ifadeleri kullanarak belirli bir metin kalıbının tüm örneklerini belirli bir yeni dizeyle değiştirir.
Arama kalıbı, JavaScript normal ifade nesnesi olarak değil, dize olarak iletilir. Bu nedenle, desendeki tüm ters eğik çizgileri çıkış karakteriyle belirtmeniz gerekir.
Bu yöntem, desteklenen söz dizimini sınırlayan Google'ın RE2 normal ifade kitaplığını kullanır.
Sağlanan normal ifade kalıbı, mevcut öğede bulunan her metin bloğuyla bağımsız olarak eşleştirilir.
const body = DocumentApp.getActiveDocument().getActiveTab().asDocumentTab().getBody(); // Clear the text surrounding "Apps Script", with or without text. body.replaceText('^.*Apps ?Script.*$', 'Apps Script');
Parametreler
| Ad | Tür | Açıklama |
|---|---|---|
search | String | Aranacak normal ifade kalıbı |
replacement | String | Değiştirme için kullanılacak metin |
Return
Element: Geçerli öğe
Yetkilendirme
Bu yöntemi kullanan komut dosyaları, aşağıdaki kapsamlardan biri veya daha fazlasıyla yetkilendirme gerektirir:
-
https://www.googleapis.com/auth/documents.currentonly -
https://www.googleapis.com/auth/documents
set Alignment(alignment)
Horizontal değerini ayarlar.
Parametreler
| Ad | Tür | Açıklama |
|---|---|---|
alignment | Horizontal | yatay hizalama |
Return
Paragraph: Geçerli öğe
Yetkilendirme
Bu yöntemi kullanan komut dosyaları, aşağıdaki kapsamlardan biri veya daha fazlasıyla yetkilendirme gerektirir:
-
https://www.googleapis.com/auth/documents.currentonly -
https://www.googleapis.com/auth/documents
set Attributes(attributes)
Öğenin özelliklerini ayarlar.
Belirtilen özellikler parametresi, her özellik adının Document numaralandırmasındaki bir öğe ve her özellik değerinin uygulanacak yeni değer olduğu bir nesne olmalıdır.
const doc = DocumentApp.getActiveDocument(); const documentTab = doc.getActiveTab().asDocumentTab(); const body = documentTab.getBody(); // Define a custom paragraph style. const style = {}; style[DocumentApp.Attribute.HORIZONTAL_ALIGNMENT] = DocumentApp.HorizontalAlignment.RIGHT; style[DocumentApp.Attribute.FONT_FAMILY] = 'Calibri'; style[DocumentApp.Attribute.FONT_SIZE] = 18; style[DocumentApp.Attribute.BOLD] = true; // Append a plain paragraph. const par = body.appendParagraph('A paragraph with custom style.'); // Apply the custom style. par.setAttributes(style);
Parametreler
| Ad | Tür | Açıklama |
|---|---|---|
attributes | Object | Öğenin özellikleri. |
Return
Paragraph: Geçerli öğe.
Yetkilendirme
Bu yöntemi kullanan komut dosyaları, aşağıdaki kapsamlardan biri veya daha fazlasıyla yetkilendirme gerektirir:
-
https://www.googleapis.com/auth/documents.currentonly -
https://www.googleapis.com/auth/documents
set Heading(heading)
Paragraph değerini ayarlar.
Parametreler
| Ad | Tür | Açıklama |
|---|---|---|
heading | Paragraph | başlık |
Return
Paragraph: Geçerli öğe
Yetkilendirme
Bu yöntemi kullanan komut dosyaları, aşağıdaki kapsamlardan biri veya daha fazlasıyla yetkilendirme gerektirir:
-
https://www.googleapis.com/auth/documents.currentonly -
https://www.googleapis.com/auth/documents
set Indent End(indentEnd)
Bitiş girintisini puan cinsinden ayarlar.
Parametreler
| Ad | Tür | Açıklama |
|---|---|---|
indent | Number | Bitiş girintisi (nokta cinsinden) |
Return
Paragraph: Geçerli öğe
Yetkilendirme
Bu yöntemi kullanan komut dosyaları, aşağıdaki kapsamlardan biri veya daha fazlasıyla yetkilendirme gerektirir:
-
https://www.googleapis.com/auth/documents.currentonly -
https://www.googleapis.com/auth/documents
set Indent First Line(indentFirstLine)
İlk satır girintisini puan cinsinden ayarlar.
Parametreler
| Ad | Tür | Açıklama |
|---|---|---|
indent | Number | ilk satır girintisi (nokta cinsinden) |
Return
Paragraph: Geçerli öğe
Yetkilendirme
Bu yöntemi kullanan komut dosyaları, aşağıdaki kapsamlardan biri veya daha fazlasıyla yetkilendirme gerektirir:
-
https://www.googleapis.com/auth/documents.currentonly -
https://www.googleapis.com/auth/documents
set Indent Start(indentStart)
Başlangıç girintisini puan cinsinden ayarlar.
Parametreler
| Ad | Tür | Açıklama |
|---|---|---|
indent | Number | Başlangıç girintisi (puan cinsinden) |
Return
Paragraph: Geçerli öğe
Yetkilendirme
Bu yöntemi kullanan komut dosyaları, aşağıdaki kapsamlardan biri veya daha fazlasıyla yetkilendirme gerektirir:
-
https://www.googleapis.com/auth/documents.currentonly -
https://www.googleapis.com/auth/documents
set Left To Right(leftToRight)
Soldan sağa ayarını belirler.
Parametreler
| Ad | Tür | Açıklama |
|---|---|---|
left | Boolean | soldan sağa ayarı |
Return
Paragraph: Geçerli öğe
Yetkilendirme
Bu yöntemi kullanan komut dosyaları, aşağıdaki kapsamlardan biri veya daha fazlasıyla yetkilendirme gerektirir:
-
https://www.googleapis.com/auth/documents.currentonly -
https://www.googleapis.com/auth/documents
set Line Spacing(multiplier)
Satır aralığını, aralık için kullanılacak satır sayısını belirten bir miktar olarak ayarlar.
Parametreler
| Ad | Tür | Açıklama |
|---|---|---|
multiplier | Number | satır sayısı |
Return
Paragraph: Geçerli öğe
Yetkilendirme
Bu yöntemi kullanan komut dosyaları, aşağıdaki kapsamlardan biri veya daha fazlasıyla yetkilendirme gerektirir:
-
https://www.googleapis.com/auth/documents.currentonly -
https://www.googleapis.com/auth/documents
set Link Url(url)
Bağlantı URL'sini ayarlar.
Parametreler
| Ad | Tür | Açıklama |
|---|---|---|
url | String | Bağlantı URL'si |
Return
Paragraph: Geçerli öğe
Yetkilendirme
Bu yöntemi kullanan komut dosyaları, aşağıdaki kapsamlardan biri veya daha fazlasıyla yetkilendirme gerektirir:
-
https://www.googleapis.com/auth/documents.currentonly -
https://www.googleapis.com/auth/documents
set Spacing After(spacingAfter)
Öğeden sonraki aralığı punto cinsinden ayarlar.
Parametreler
| Ad | Tür | Açıklama |
|---|---|---|
spacing | Number | Öğeden sonraki aralık (punto cinsinden) |
Return
Paragraph: Geçerli öğe
Yetkilendirme
Bu yöntemi kullanan komut dosyaları, aşağıdaki kapsamlardan biri veya daha fazlasıyla yetkilendirme gerektirir:
-
https://www.googleapis.com/auth/documents.currentonly -
https://www.googleapis.com/auth/documents
set Spacing Before(spacingBefore)
Öğeden önceki aralığı punto cinsinden ayarlar.
Parametreler
| Ad | Tür | Açıklama |
|---|---|---|
spacing | Number | öğeden önceki aralık (punto cinsinden) |
Return
Paragraph: Geçerli öğe
Yetkilendirme
Bu yöntemi kullanan komut dosyaları, aşağıdaki kapsamlardan biri veya daha fazlasıyla yetkilendirme gerektirir:
-
https://www.googleapis.com/auth/documents.currentonly -
https://www.googleapis.com/auth/documents
set Text(text)
Paragrafın içeriğini metin olarak ayarlar.
Not: Mevcut içerikler temizlenir.
Parametreler
| Ad | Tür | Açıklama |
|---|---|---|
text | String | yeni metin içerikleri |
Yetkilendirme
Bu yöntemi kullanan komut dosyaları, aşağıdaki kapsamlardan biri veya daha fazlasıyla yetkilendirme gerektirir:
-
https://www.googleapis.com/auth/documents.currentonly -
https://www.googleapis.com/auth/documents
set Text Alignment(textAlignment)
Metin hizalamasını ayarlar. Kullanılabilir hizalama türleri Document, Document ve Document'dir.
// Make the entire first paragraph in the active tab be superscript. const documentTab = DocumentApp.getActiveDocument().getActiveTab().asDocumentTab(); const text = documentTab.getBody().getParagraphs()[0].editAsText(); text.setTextAlignment(DocumentApp.TextAlignment.SUPERSCRIPT);
Parametreler
| Ad | Tür | Açıklama |
|---|---|---|
text | Text | Uygulanacak metin hizalama türü |
Return
Paragraph: Geçerli öğe
Yetkilendirme
Bu yöntemi kullanan komut dosyaları, aşağıdaki kapsamlardan biri veya daha fazlasıyla yetkilendirme gerektirir:
-
https://www.googleapis.com/auth/documents.currentonly -
https://www.googleapis.com/auth/documents