add_replace_all_shapes_with_image_request: Add a replace all shapes with image request

Description Usage Arguments Examples

View source: R/build.R

Description

Add a replace all shapes with image request

Usage

1
2
3
4
5
6
7
8
add_replace_all_shapes_with_image_request(
  google_slides_request = NULL,
  image_url,
  replace_method = "CENTER_INSIDE",
  page_object_ids = NULL,
  text,
  match_case = TRUE
)

Arguments

google_slides_request

(Optional) A Google Slides Request object which is used to manage requests to the API

image_url

The image URL. The image is fetched once at insertion time and a copy is stored for display inside the presentation. Image must be less than 50mb in size

replace_method

The replace method. Accepts 'CENTER_INSIDE' and 'CENTER_CROP'

page_object_ids

(Optional) A character vector that contains the list of slide pages that you wish to enact the change on. It can contain multiple values.

text

The text to search for in the shape or table.

match_case

Indicates whether the search should respect case

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Not run: 
library(rgoogleslides)
rgoogleslides::authorize()

# Define the presentation slide id (Can be retrieved from the url of the slides)
slides_id <- "<slide-id>"

# Define the internal drive image file to be inserted into slides
file_id <- "<file_id>"

request <- add_replace_all_shapes_with_image_request(image_url = file_id, text = 'aaa')
commit_to_slides(slides_id, request)

## End(Not run)

hairizuanbinnoorazman/googleslides documentation built on Nov. 6, 2021, 7:48 a.m.