An R6 class to represent and manipulate Google Slides presentations.
Public fields
titleThe title of the presentation
presentation_idThe Google Slides presentation ID
page_sizeDimensions of slides (height and width in PTs)
revision_idThe current revision ID from Google Drive
localeThe presentation locale (e.g., "en")
mastersList of master slide metadata
layoutsList of layout slide metadata
last_refreshedTimestamp of last refresh from API
Methods
presentation$new()
Create or open a presentation
Usage
presentation$new(id = NULL, title = "Untitled Presentation", set_active = TRUE)presentation$get_page_raw()
Get raw page data for a slide, with 15-second TTL caching.
Calls the slides.presentations.pages.get endpoint and caches the
result per slide ID with a 15-second time-to-live. Repeated calls
within the TTL return the cached value without an HTTP request.
The cache is keyed by slide_id, so different slides are cached
independently. Calling $refresh() clears all cached page data so
the next call always re-fetches.
presentation$get_slide_notes_text()
Get the speaker notes text for a slide. Does not refresh; caller is responsible for refreshing first.
presentation$get_elements()
Filter the elements you have constructed to return a list of elements
Usage
presentation$get_elements(
modified_since = NULL,
modified_end = NULL,
created_since = NULL,
created_end = NULL,
element_type = NULL,
element_text = NULL,
show_deleted = FALSE
)Arguments
modified_sinceOptional. Only return elements modified since this time
modified_endOptional. Only return elements modified before this time
created_sinceOptional. Only return elements created since this time
created_endOptional. Only return elements created before this time
element_typeOptional. Only return elements of this type
element_textOptional. Only return elements with this text
show_deletedOptional. Show deleted elements
presentation$add_to_ledger()
Add an element to the ledger