Method: presentations.pages.getThumbnail
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
สร้างภาพขนาดย่อของหน้าเว็บที่ระบุในเวอร์ชันล่าสุดของงานนำเสนอและแสดงผล URL ของรูปภาพขนาดย่อ
ระบบจะนับคำขอนี้ว่าเป็นคำขออ่านที่มีค่าใช้จ่ายสูงสำหรับวัตถุประสงค์ด้านโควต้า
คำขอ HTTP
GET https://slides.googleapis.com/v1/presentations/{presentationId}/pages/{pageObjectId}/thumbnail
URL ใช้ไวยากรณ์การแปลง gRPC
พารามิเตอร์เส้นทาง
พารามิเตอร์ |
presentationId |
string
รหัสของงานนำเสนอที่จะดึงข้อมูล
|
pageObjectId |
string
รหัสออบเจ็กต์ของหน้าเว็บที่จะดึงข้อมูลภาพปก
|
พารามิเตอร์การค้นหา
พารามิเตอร์ |
thumbnailProperties |
object (ThumbnailProperties )
คุณสมบัติของภาพปก
|
เนื้อหาของคำขอ
เนื้อหาของคำขอต้องว่างเปล่า
เนื้อหาการตอบกลับ
ภาพปกของหน้าเว็บ
หากทำสำเร็จ เนื้อหาการตอบกลับจะมีข้อมูลซึ่งมีโครงสร้างดังต่อไปนี้
การแสดง JSON |
{
"width": integer,
"height": integer,
"contentUrl": string
} |
ช่อง |
width |
integer
ความกว้างเป็นพิกเซลของภาพขนาดย่อที่มากกว่า 0
|
height |
integer
ความสูงเป็นพิกเซลของภาพขนาดย่อที่มากกว่า 0
|
contentUrl |
string
URL เนื้อหาของภาพขนาดย่อ URL ของรูปภาพมีอายุเริ่มต้น 30 นาที URL นี้ติดแท็กด้วยบัญชีของผู้ขอ ทุกคนที่มี URL ดังกล่าวจะเข้าถึงรูปภาพในฐานะผู้ขอเดิมได้ คุณอาจเสียสิทธิ์เข้าถึงรูปภาพหากการตั้งค่าการแชร์ของงานนำเสนอมีการเปลี่ยนแปลง ประเภท MIME ของภาพปกเหมือนกับที่ระบุไว้ใน GetPageThumbnailRequest
|
ขอบเขตการให้สิทธิ์
ต้องใช้ขอบเขต OAuth ต่อไปนี้
https://www.googleapis.com/auth/drive
https://www.googleapis.com/auth/drive.file
https://www.googleapis.com/auth/drive.readonly
https://www.googleapis.com/auth/presentations
https://www.googleapis.com/auth/presentations.readonly
ดูข้อมูลเพิ่มเติมได้ที่คู่มือการให้สิทธิ์
ThumbnailProperties
ควบคุมการสร้างภาพปกของหน้าเว็บ
ช่อง |
mimeType |
enum (MimeType )
ประเภท MIME ที่ไม่บังคับของรูปภาพขนาดย่อ หากไม่ได้ระบุประเภท MIME ระบบจะใช้ประเภท MIME เป็น PNG โดยค่าเริ่มต้น
|
thumbnailSize |
enum (ThumbnailSize )
ขนาดรูปภาพขนาดย่อ (ไม่บังคับ) หากไม่ระบุขนาด เซิร์ฟเวอร์จะเลือกขนาดเริ่มต้นของรูปภาพ
|
MimeType
ประเภท MIME ของรูปภาพขนาดย่อ
Enum |
PNG |
ประเภท MIME เริ่มต้น |
ThumbnailSize
ขนาดรูปภาพขนาดย่อที่กำหนดไว้ล่วงหน้า
Enum |
THUMBNAIL_SIZE_UNSPECIFIED |
ขนาดรูปภาพขนาดย่อเริ่มต้น ขนาดภาพขนาดย่อที่ไม่ได้ระบุหมายความว่าเซิร์ฟเวอร์จะเลือกขนาดของรูปภาพในลักษณะที่อาจแตกต่างกันในอนาคต |
LARGE |
ความกว้างของภาพขนาดย่อ 1600 พิกเซล |
MEDIUM |
ความกว้างของภาพขนาดย่อ 800 พิกเซล |
SMALL |
ความกว้างของภาพขนาดย่อ 200 พิกเซล |
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-03-25 UTC
[null,null,["อัปเดตล่าสุด 2025-03-25 UTC"],[],[],null,["# Method: presentations.pages.getThumbnail\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n - [JSON representation](#body.Thumbnail.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [ThumbnailProperties](#ThumbnailProperties)\n - [JSON representation](#ThumbnailProperties.SCHEMA_REPRESENTATION)\n- [MimeType](#MimeType)\n- [ThumbnailSize](#ThumbnailSize)\n- [Try it!](#try-it)\n\nGenerates a thumbnail of the latest version of the specified page in the presentation and returns a URL to the thumbnail image.\n\nThis request counts as an [expensive read request](https://developers.google.com/workspace/slides/limits) for quota purposes.\n\n### HTTP request\n\n`GET https://slides.googleapis.com/v1/presentations/{presentationId}/pages/{pageObjectId}/thumbnail`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|------------------|-----------------------------------------------------------------|\n| `presentationId` | `string` The ID of the presentation to retrieve. |\n| `pageObjectId` | `string` The object ID of the page whose thumbnail to retrieve. |\n\n### Query parameters\n\n| Parameters ||\n|-----------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `thumbnailProperties` | `object (`[ThumbnailProperties](/workspace/slides/api/reference/rest/v1/presentations.pages/getThumbnail#ThumbnailProperties)`)` The thumbnail properties. |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nThe thumbnail of a page.\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|-----------------------------------------------------------------------|\n| ``` { \"width\": integer, \"height\": integer, \"contentUrl\": string } ``` |\n\n| Fields ||\n|--------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `width` | `integer` The positive width in pixels of the thumbnail image. |\n| `height` | `integer` The positive height in pixels of the thumbnail image. |\n| `contentUrl` | `string` The content URL of the thumbnail image. The URL to the image has a default lifetime of 30 minutes. This URL is tagged with the account of the requester. Anyone with the URL effectively accesses the image as the original requester. Access to the image may be lost if the presentation's sharing settings change. The mime type of the thumbnail image is the same as specified in the `GetPageThumbnailRequest`. |\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/drive`\n- `https://www.googleapis.com/auth/drive.file`\n- `https://www.googleapis.com/auth/drive.readonly`\n- `https://www.googleapis.com/auth/presentations`\n- `https://www.googleapis.com/auth/presentations.readonly`\n\nFor more information, see the [Authorization guide](/workspace/guides/configure-oauth-consent).\n\nThumbnailProperties\n-------------------\n\nProvides control over page thumbnail creation.\n\n| JSON representation |\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"mimeType\": enum (/workspace/slides/api/reference/rest/v1/presentations.pages/getThumbnail#MimeType), \"thumbnailSize\": enum (/workspace/slides/api/reference/rest/v1/presentations.pages/getThumbnail#ThumbnailSize) } ``` |\n\n| Fields ||\n|-----------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `mimeType` | `enum (`[MimeType](/workspace/slides/api/reference/rest/v1/presentations.pages/getThumbnail#MimeType)`)` The optional mime type of the thumbnail image. If you don't specify the mime type, the mime type defaults to PNG. |\n| `thumbnailSize` | `enum (`[ThumbnailSize](/workspace/slides/api/reference/rest/v1/presentations.pages/getThumbnail#ThumbnailSize)`)` The optional thumbnail image size. If you don't specify the size, the server chooses a default size of the image. |\n\nMimeType\n--------\n\nThe mime type of the thumbnail image.\n\n| Enums ||\n|-------|------------------------|\n| `PNG` | The default mime type. |\n\nThumbnailSize\n-------------\n\nThe predefined thumbnail image sizes.\n\n| Enums ||\n|------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `THUMBNAIL_SIZE_UNSPECIFIED` | The default thumbnail image size. The unspecified thumbnail size implies that the server chooses the size of the image in a way that might vary in the future. |\n| `LARGE` | The thumbnail image width of 1600px. |\n| `MEDIUM` | The thumbnail image width of 800px. |\n| `SMALL` | The thumbnail image width of 200px. |"]]