This document presents a set of code samples and codelabs that demonstrate how
to translate an intended Google Slides action into an Google Slides API request.

## Code samples

The code samples listed in this section demonstrate how to express common
actions in Slides as Slides API requests.

These samples are presented as HTTP requests to be language neutral. To learn
how to implement Slides API request protocols in a specific language
using Google API client libraries, see the following guides:

- [Create a slide](https://developers.google.com/workspace/slides/api/guides/create-slide)
- [Add shapes and text to a slide](https://developers.google.com/workspace/slides/api/guides/add-shape)
- [Merge data into a presentation](https://developers.google.com/workspace/slides/api/guides/merge)
- [Add charts to a slide](https://developers.google.com/workspace/slides/api/guides/add-chart)
- [Edit and style text](https://developers.google.com/workspace/slides/api/guides/styling)

The code samples in this section are divided into the following categories:

- [Basic reading](https://developers.google.com/workspace/slides/api/samples/reading): Samples that show common ways of reading information from a presentation
- [Basic writing](https://developers.google.com/workspace/slides/api/samples/writing): Samples that show common ways of writing to a presentation
- [Element operations](https://developers.google.com/workspace/slides/api/samples/elements): Samples that show common page element creation and editing tasks
- [Presentation operations](https://developers.google.com/workspace/slides/api/samples/presentation): Samples that show how to create and manipulate a presentation
- [Slide operations](https://developers.google.com/workspace/slides/api/samples/slides): Samples that show how to create, move, and delete slides in a presentation
- [Table operations](https://developers.google.com/workspace/slides/api/samples/tables): Samples that show how to create and edit tables within a slide
- [Transform operations](https://developers.google.com/workspace/slides/api/samples/transform): Samples that show how to alter the size and positioning of elements within a slide

## Codelab

![Custom presentation tool for analysis of common software licenses](https://developers.google.com/static/workspace/slides/api/images/slides_codelab.jpg) Custom presentation tool for analysis of common software licenses.

The [Slides
codelab](https://codelabs.developers.google.com/codelabs/slides-api) teaches you
how to use the Slides API as a custom presentation tool for an
analysis of the most common software licenses.

You'll learn how to query all open source code on GitHub using [BigQuery](https://cloud.google.com/bigquery) and create a slide deck using
Slides API to present your results.

## Best practices

There's often more than one way to complete a given task with the
Slides API. Use the batch method
[`presentations.batchUpdate`](https://developers.google.com/workspace/slides/api/reference/rest/v1/presentations/batchUpdate)
wherever possible to bundle multiple update requests into a single method call.
This reduces client HTTP overhead, reduces the number of queries, minimizes the
number of revisions on the presentation, and applies all the changes atomically.

To further improve performance, use [field
masks](https://developers.google.com/workspace/slides/api/guides/field-masks) when reading and updating
presentations, pages, and page elements.