Method: presentations.pages.getThumbnail
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Tạo hình thu nhỏ của phiên bản mới nhất của trang được chỉ định trong bản trình bày và trả về URL đến hình thu nhỏ.
Yêu cầu này được tính là yêu cầu đọc tốn kém cho mục đích hạn mức.
Yêu cầu HTTP
GET https://slides.googleapis.com/v1/presentations/{presentationId}/pages/{pageObjectId}/thumbnail
URL sử dụng cú pháp Chuyển mã gRPC.
Tham số đường dẫn
Thông số |
presentationId |
string
Mã nhận dạng của bản trình bày cần truy xuất.
|
pageObjectId |
string
Mã nhận dạng đối tượng của trang có hình thu nhỏ cần truy xuất.
|
Tham số truy vấn
Thông số |
thumbnailProperties |
object (ThumbnailProperties )
Thuộc tính hình thu nhỏ.
|
Nội dung yêu cầu
Nội dung yêu cầu phải trống.
Nội dung phản hồi
Hình thu nhỏ của một trang.
Nếu thành công, phần nội dung phản hồi sẽ chứa dữ liệu có cấu trúc sau:
Biểu diễn dưới dạng JSON |
{
"width": integer,
"height": integer,
"contentUrl": string
} |
Trường |
width |
integer
Chiều rộng dương tính tính bằng pixel của hình thu nhỏ.
|
height |
integer
Chiều cao dương tính tính bằng pixel của hình thu nhỏ.
|
contentUrl |
string
URL nội dung của hình thu nhỏ. URL đến hình ảnh có thời gian tồn tại mặc định là 30 phút. URL này được gắn thẻ với tài khoản của người yêu cầu. Bất kỳ ai có URL này đều có thể truy cập vào hình ảnh dưới vai trò là người yêu cầu ban đầu. Bạn có thể mất quyền truy cập vào hình ảnh nếu chế độ cài đặt chia sẻ của bản trình bày thay đổi. Loại mime của hình thu nhỏ giống với loại đã chỉ định trong GetPageThumbnailRequest .
|
Phạm vi uỷ quyền
Yêu cầu một trong các phạm vi OAuth sau:
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
Để biết thêm thông tin, hãy xem Hướng dẫn uỷ quyền.
ThumbnailProperties
Cung cấp quyền kiểm soát đối với việc tạo hình thu nhỏ trang.
Trường |
mimeType |
enum (MimeType )
Loại mime không bắt buộc của hình thu nhỏ. Nếu bạn không chỉ định loại MIME, thì loại MIME mặc định sẽ là PNG.
|
thumbnailSize |
enum (ThumbnailSize )
Kích thước hình thu nhỏ không bắt buộc. Nếu bạn không chỉ định kích thước, máy chủ sẽ chọn kích thước mặc định của hình ảnh.
|
MimeType
Loại MIME của hình thu nhỏ.
Enum |
PNG |
Loại MIME mặc định. |
ThumbnailSize
Kích thước hình thu nhỏ được xác định trước.
Enum |
THUMBNAIL_SIZE_UNSPECIFIED |
Kích thước hình thu nhỏ mặc định. Kích thước hình thu nhỏ không được chỉ định có nghĩa là máy chủ chọn kích thước hình ảnh theo cách có thể thay đổi trong tương lai. |
LARGE |
Chiều rộng hình thu nhỏ là 1600 px. |
MEDIUM |
Chiều rộng hình thu nhỏ là 800px. |
SMALL |
Chiều rộng hình thu nhỏ là 200px. |
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-03-25 UTC.
[null,null,["Cập nhật lần gần đây nhất: 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. |"]]