Bir köprü.
Yöntemler
| Yöntem | Dönüş türü | Kısa açıklama |
|---|---|---|
get | Link | Link değerini döndürür. |
get | Slide|null | URL olmayan bağlantı türleri için varsa bağlı Slide öğesini döndürür. |
get | String|null | Link, Link değilse bağlı Slide veya null kimliğini döndürür. |
get | Integer|null | Link, Link değilse bağlı Slide veya null öğesinin sıfır tabanlı dizinini döndürür. |
get | Slide | Bağlı Slide veya Slide değerini ya da Link değeri Link değilse null değerini döndürür. |
get | String|null | Harici web sayfasının URL'sini veya Link Link değilse null değerini döndürür. |
Ayrıntılı belgeler
getLinkType()
LinkType değerini döndürür.
const shape = SlidesApp.getActivePresentation().getSlides()[0].getShapes()[0]; const link = shape.getLink(); if (link != null) { Logger.log(`Shape has a link of type: ${link.getLinkType()}`); }
Return
Yetkilendirme
Bu yöntemi kullanan komut dosyaları, aşağıdaki kapsamlardan biri veya daha fazlasıyla yetkilendirme gerektirir:
-
https://www.googleapis.com/auth/presentations.currentonly -
https://www.googleapis.com/auth/presentations
getLinkedSlide()
URL olmayan bağlantı türleri için varsa bağlı Slide öğesini döndürür. Slayt sunuda yoksa veya LinkType değeri LinkType.URL ise null değerini döndürür.
const shape = SlidesApp.getActivePresentation().getSlides()[0].getShapes()[0]; const link = shape.getLink(); if (link != null && link.getLinkType() !== SlidesApp.LinkType.URL) { Logger.log(`Shape has link to slide: ${link.getLinkedSlide()}`); }
Return
Slide|null
Yetkilendirme
Bu yöntemi kullanan komut dosyaları, aşağıdaki kapsamlardan biri veya daha fazlasıyla yetkilendirme gerektirir:
-
https://www.googleapis.com/auth/presentations.currentonly -
https://www.googleapis.com/auth/presentations
getSlideId()
LinkType, LinkType.SLIDE_ID değilse bağlı Slide veya null öğesinin kimliğini döndürür.
Döndürülen kimliğe sahip slaytın mevcut olmayabileceğini unutmayın.
const shape = SlidesApp.getActivePresentation().getSlides()[0].getShapes()[0]; const link = shape.getLink(); if (link != null && link.getLinkType() === SlidesApp.LinkType.SLIDE_ID) { Logger.log(`Shape has link to slide with ID: ${link.getSlideId()}`); }
Return
String|null
Yetkilendirme
Bu yöntemi kullanan komut dosyaları, aşağıdaki kapsamlardan biri veya daha fazlasıyla yetkilendirme gerektirir:
-
https://www.googleapis.com/auth/presentations.currentonly -
https://www.googleapis.com/auth/presentations
getSlideIndex()
LinkType, LinkType.SLIDE_INDEX değilse bağlı Slide veya null öğesinin sıfır tabanlı dizinini döndürür.
Döndürülen dizindeki slaytın mevcut olmayabileceğini unutmayın.
const shape = SlidesApp.getActivePresentation().getSlides()[0].getShapes()[0]; const link = shape.getLink(); if (link != null && link.getLinkType() === SlidesApp.LinkType.SLIDE_INDEX) { Logger.log(`Shape has link to slide with index: ${link.getSlideIndex()}`); }
Return
Integer|null
Yetkilendirme
Bu yöntemi kullanan komut dosyaları, aşağıdaki kapsamlardan biri veya daha fazlasıyla yetkilendirme gerektirir:
-
https://www.googleapis.com/auth/presentations.currentonly -
https://www.googleapis.com/auth/presentations
getSlidePosition()
Bağlı SlidePosition veya Slide değerini ya da LinkType değeri LinkType.SLIDE_POSITION değilse null değerini döndürür.
Döndürülen göreli konuma sahip slaytın mevcut olmayabileceğini unutmayın.
const shape = SlidesApp.getActivePresentation().getSlides()[0].getShapes()[0]; const link = shape.getLink(); if (link != null && link.getLinkType() === SlidesApp.LinkType.SLIDE_POSITION) { Logger.log( `Shape has link to slide with relative position: ${ link.getSlidePosition()}`, ); }
Return
SlidePosition|null
Yetkilendirme
Bu yöntemi kullanan komut dosyaları, aşağıdaki kapsamlardan biri veya daha fazlasıyla yetkilendirme gerektirir:
-
https://www.googleapis.com/auth/presentations.currentonly -
https://www.googleapis.com/auth/presentations
getUrl()
Harici web sayfasının URL'sini veya LinkType LinkType.URL değilse null değerini döndürür.
const shape = SlidesApp.getActivePresentation().getSlides()[0].getShapes()[0]; const link = shape.getLink(); if (link != null && link.getLinkType() === SlidesApp.LinkType.URL) { Logger.log(`Shape has link to URL: ${link.getUrl()}`); }
Return
String|null
Yetkilendirme
Bu yöntemi kullanan komut dosyaları, aşağıdaki kapsamlardan biri veya daha fazlasıyla yetkilendirme gerektirir:
-
https://www.googleapis.com/auth/presentations.currentonly -
https://www.googleapis.com/auth/presentations