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.
Phần này trình bày một bộ ứng dụng mẫu và các ví dụ về "công thức" minh hoạ cách dịch một hành động dự kiến trên Google Trang trình bày thành một yêu cầu Google Trang trình bày API.
Lớp học lập trình
Lớp học lập trình Trang trình bày hướng dẫn bạn cách sử dụng Google Slides API làm công cụ trình bày tuỳ chỉnh để phân tích các giấy phép phần mềm phổ biến nhất.
Bạn sẽ tìm hiểu cách truy vấn tất cả mã nguồn mở trên GitHub bằng BigQuery và tạo một bản trình bày bằng Slides API để trình bày kết quả.
Ứng dụng mẫu
Công cụ dòng lệnh Markdown to Slides (Markdown sang Trang trình bày) cho phép bạn tạo bộ trang trình bày từ các tệp markdown.
Bạn có thể dùng thư viện này để khám phá Slides API, hoặc phân nhánh kho lưu trữ và sửa đổi mã để cung cấp đầu ra của Slides cho ứng dụng JavaScript.
Recipe
Các ví dụ được liệt kê trong phần này minh hoạ cách thể hiện các thao tác phổ biến trong Trang trình bày dưới dạng yêu cầu của API Trang trình bày.
Các ví dụ này được trình bày dưới dạng yêu cầu HTTP để không phụ thuộc vào ngôn ngữ. Để tìm hiểu cách triển khai các giao thức yêu cầu Slides API bằng một ngôn ngữ cụ thể thông qua thư viện ứng dụng API của Google, hãy xem các hướng dẫn sau:
Thao tác với trang trình bày – Các công thức cho biết cách tạo, di chuyển và xoá trang trình bày trong một bản trình bày.
Thao tác với bảng – Các công thức cho biết cách tạo và chỉnh sửa bảng trong một trang trình bày.
Thao tác biến đổi – Các công thức cho biết cách thay đổi kích thước và vị trí của các phần tử trong một trang trình bày.
Thường có nhiều cách để hoàn thành một nhiệm vụ nhất định bằng Slides API. Sử dụng phương thức hàng loạt presentations.batchUpdate bất cứ khi nào có thể để kết hợp nhiều yêu cầu cập nhật vào một lệnh gọi phương thức.
Điều này giúp giảm mức hao tổn HTTP của máy khách, giảm số lượng truy vấn, giảm thiểu số lượng bản sửa đổi trên bản trình bày và áp dụng tất cả các thay đổi một cách tự động.
Để cải thiện hơn nữa hiệu suất, hãy sử dụng mặt nạ trường khi đọc và cập nhật bản trình bày, trang và các phần tử trên trang.
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2025-08-29 UTC."],[],[],null,["# Samples\n\nThis section presents a set of sample applications and \"recipe\" examples that\ndemonstrate how to translate an intended Google Slides action into an\nGoogle Slides API request.\n\nCodelabs\n--------\n\nThe [Slides\ncodelab](https://codelabs.developers.google.com/codelabs/slides-api)\nteaches you how to use Google Slides API as a custom presentation tool for an\nanalysis of the most common software licenses.\n\nYou'll learn how to query all open source code on GitHub using [BigQuery](https://cloud.google.com/bigquery) and create a\nslide deck using Slides API to present your results.\n\nSample applications\n-------------------\n\nThe [Markdown to\nSlides](https://github.com/googleworkspace/md2googleslides)\ncommand-line tool lets you generate slide decks from markdown files.\n\nYou can use this to explore the Slides API, or fork the repository and\nmodify the code to provide Slides output to your JavaScript\napplication.\n\nRecipes\n-------\n\nThe examples listed in this section demonstrate how to express common actions in\nSlides as Slides API requests.\n\nThese examples are presented as HTTP requests to be language neutral. To learn\nhow to implement Slides API request protocols in a specific language\nusing Google API client libraries, see the following guides:\n\n- [Create a slide](/workspace/slides/api/guides/create-slide)\n- [Add shapes and text](/workspace/slides/api/guides/add-shape)\n- [Merge data into a presentation](/workspace/slides/api/guides/merge)\n- [Add charts to a slide](/workspace/slides/api/guides/add-chart)\n- [Edit and style text](/workspace/slides/api/guides/styling)\n\nRecipes in this section are divided into the following categories:\n\n- [Basic reading](/workspace/slides/api/samples/reading)---Recipes that show common ways of reading information from a presentation.\n- [Basic writing](/workspace/slides/api/samples/writing)---Recipes that show common ways of writing to a presentation.\n- [Element operations](/workspace/slides/api/samples/elements)---Recipes that show common page element creation and editing tasks.\n- [Presentation operations](/workspace/slides/api/samples/presentation)---Recipes that show how to create and manipulate a presentation.\n- [Slide operations](/workspace/slides/api/samples/slides)---Recipes that show how to create, move, and delete slides in a presentation.\n- [Table operations](/workspace/slides/api/samples/tables)---Recipes that show how to create and edit tables within a slide.\n- [Transform operations](/workspace/slides/api/samples/transform)---Recipes that show how to alter the size and positioning of elements within a slide.\n\nThere's often more than one way to complete a given task with the\nSlides API. Use the batch method\n[`presentations.batchUpdate`](/workspace/slides/api/reference/rest/v1/presentations/batchUpdate)\nwherever possible to bundle multiple update requests into a single method call.\nThis reduces client HTTP overhead, reduces the number of queries, minimizes the\nnumber of revisions on the presentation, and applies all the changes atomically.\n\nTo further improve performance, use [field\nmasks](/workspace/slides/api/guides/field-masks) when reading and updating presentations,\npages, and page elements."]]