Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

drive_publish

Publish native Google files


Description

Publish (or un-publish) native Google files to the web. Native Google files include Google Docs, Google Sheets, and Google Slides. The returned dribble will have extra columns, published and revisions_resource. Read more in drive_reveal().

Usage

drive_publish(file, ..., verbose = TRUE)

drive_unpublish(file, ..., verbose = TRUE)

Arguments

file

Something that identifies the file(s) of interest on your Google Drive. Can be a character vector of names/paths, a character vector of file ids or URLs marked with as_id(), or a dribble.

...

Name-value pairs to add to the API request body (see API docs linked below for details). For drive_publish(), we include publishAuto = TRUE and publishedOutsideDomain = TRUE, if user does not specify other values.

verbose

Logical, indicating whether to print informative messages (default TRUE).

Value

An object of class dribble, a tibble with one row per item.

See Also

Wraps the revisions.update endpoint:

Examples

## Not run: 
## Upload file to publish
file <- drive_upload(
  drive_example("chicken.csv"),
  type = "spreadsheet"
  )

## Publish file
file <- drive_publish(file)
file$published

## Unpublish file
file <- drive_unpublish(file)
file$published

## Clean up
drive_rm(file)

## End(Not run)

googledrive

An Interface to Google Drive

v1.0.1
MIT + file LICENSE
Authors
Lucy D'Agostino McGowan [aut], Jennifer Bryan [aut, cre] (<https://orcid.org/0000-0002-6983-2759>), RStudio [cph, fnd]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.