#' Creates a new shared drive.
#'
#' Autogenerated via \code{\link[googlePackageMaker]{package_make}}.
#'
#' @seealso \href{https://developers.google.com/drive/}{Google Documentation}
#'
#' @details
#' Authentication scopes used by this function are:
#' \itemize{
#' \item https://www.googleapis.com/auth/drive
#' }
#' @param requestId An ID, such as a random UUID, which uniquely identifies this user's request for idempotent creation of a shared drive. A repeated request by the same user and with the same request ID will avoid creating duplicates by attempting to create the same shared drive. If the shared drive already exists a 409 error will be returned.
#' @param backgroundImageFile An image file and cropping parameters from which a background image for this shared drive is set. This is a write only field; it can only be set on drive.drives.update requests that don't set themeId. When specified, all fields of the backgroundImageFile must be set.
#' @param backgroundImageLink A short-lived link to this shared drive's background image.
#' @param capabilities Capabilities the current user has on this shared drive.
#' @param colorRgb The color of this shared drive as an RGB hex string. It can only be set on a drive.drives.update request that does not set themeId.
#' @param createdTime The time at which the shared drive was created (RFC 3339 date-time).
#' @param hidden Whether the shared drive is hidden from default view.
#' @param id The ID of this shared drive which is also the ID of the top level folder of this shared drive.
#' @param kind Identifies what kind of resource this is. Value: the fixed string "drive#drive".
#' @param name The name of this shared drive.
#' @param restrictions A set of restrictions that apply to this shared drive or items inside this shared drive.
#' @param themeId The ID of the theme from which the background image and color will be set. The set of possible driveThemes can be retrieved from a drive.about.get response. When not specified on a drive.drives.create request, a random theme is chosen from which the background image and color are set. This is a write-only field; it can only be set on requests that don't set colorRgb or backgroundImageFile.
#' @param gargle_token A token prepared by one of gargle's token generating functions. Defaults to gargle::token_fetch(...) with appropriate scopes. See \code{\link[gargle]{token_fetch}} for more info.
#' @param return_response Whether to return the response or the response content. Defaults to FALSE (return response content).
#' @export
drives.create <- function(requestId, backgroundImageFile = NULL, backgroundImageLink = NULL, capabilities = NULL, colorRgb = NULL, createdTime = NULL, hidden = NULL, id = NULL, kind = NULL, name = NULL, restrictions = NULL, themeId = NULL, gargle_token = gargle::token_fetch(scopes = .endpoints[['drive.drives.create']]$scopes), return_response = F){
params <- as.list(environment())[!names(as.list(environment())) %in% c('return_response', 'gargle_token')]
req <- gargle::request_develop(endpoint = .endpoints[['drive.drives.create']], params = params, base_url = 'https://www.googleapis.com/')
req <- gargle::request_build(method = req$method, path = req$path, params = req$params, body = req$body, token = httr::config(token = gargle_token), base_url = req$base_url)
res <- gargle::request_make(req, encode = 'json')
if(return_response) return(res)
httr::content(res)
}
#' Permanently deletes a shared drive for which the user is an organizer.
#'
#' The shared drive cannot contain any untrashed items. Autogenerated via \code{\link[googlePackageMaker]{package_make}}.
#'
#' @seealso \href{https://developers.google.com/drive/}{Google Documentation}
#'
#' @details
#' Authentication scopes used by this function are:
#' \itemize{
#' \item https://www.googleapis.com/auth/drive
#' }
#' @param driveId The ID of the shared drive.
#' @param gargle_token A token prepared by one of gargle's token generating functions. Defaults to gargle::token_fetch(...) with appropriate scopes. See \code{\link[gargle]{token_fetch}} for more info.
#' @param return_response Whether to return the response or the response content. Defaults to FALSE (return response content).
#' @export
drives.delete <- function(driveId, gargle_token = gargle::token_fetch(scopes = .endpoints[['drive.drives.delete']]$scopes), return_response = F){
params <- as.list(environment())[!names(as.list(environment())) %in% c('return_response', 'gargle_token')]
req <- gargle::request_develop(endpoint = .endpoints[['drive.drives.delete']], params = params, base_url = 'https://www.googleapis.com/')
req <- gargle::request_build(method = req$method, path = req$path, params = req$params, body = req$body, token = httr::config(token = gargle_token), base_url = req$base_url)
res <- gargle::request_make(req, encode = 'json')
if(return_response) return(res)
httr::content(res)
}
#' Gets a shared drive's metadata by ID.
#'
#' Autogenerated via \code{\link[googlePackageMaker]{package_make}}.
#'
#' @seealso \href{https://developers.google.com/drive/}{Google Documentation}
#'
#' @details
#' Authentication scopes used by this function are:
#' \itemize{
#' \item https://www.googleapis.com/auth/drive
#' \item https://www.googleapis.com/auth/drive.readonly
#' }
#' @param driveId The ID of the shared drive.
#' @param useDomainAdminAccess Issue the request as a domain administrator; if set to true, then the requester will be granted access if they are an administrator of the domain to which the shared drive belongs.
#' @param gargle_token A token prepared by one of gargle's token generating functions. Defaults to gargle::token_fetch(...) with appropriate scopes. See \code{\link[gargle]{token_fetch}} for more info.
#' @param return_response Whether to return the response or the response content. Defaults to FALSE (return response content).
#' @export
drives.get <- function(driveId, useDomainAdminAccess = NULL, gargle_token = gargle::token_fetch(scopes = .endpoints[['drive.drives.get']]$scopes), return_response = F){
params <- as.list(environment())[!names(as.list(environment())) %in% c('return_response', 'gargle_token')]
req <- gargle::request_develop(endpoint = .endpoints[['drive.drives.get']], params = params, base_url = 'https://www.googleapis.com/')
req <- gargle::request_build(method = req$method, path = req$path, params = req$params, body = req$body, token = httr::config(token = gargle_token), base_url = req$base_url)
res <- gargle::request_make(req, encode = 'json')
if(return_response) return(res)
httr::content(res)
}
#' Hides a shared drive from the default view.
#'
#' Autogenerated via \code{\link[googlePackageMaker]{package_make}}.
#'
#' @seealso \href{https://developers.google.com/drive/}{Google Documentation}
#'
#' @details
#' Authentication scopes used by this function are:
#' \itemize{
#' \item https://www.googleapis.com/auth/drive
#' }
#' @param driveId The ID of the shared drive.
#' @param gargle_token A token prepared by one of gargle's token generating functions. Defaults to gargle::token_fetch(...) with appropriate scopes. See \code{\link[gargle]{token_fetch}} for more info.
#' @param return_response Whether to return the response or the response content. Defaults to FALSE (return response content).
#' @export
drives.hide <- function(driveId, gargle_token = gargle::token_fetch(scopes = .endpoints[['drive.drives.hide']]$scopes), return_response = F){
params <- as.list(environment())[!names(as.list(environment())) %in% c('return_response', 'gargle_token')]
req <- gargle::request_develop(endpoint = .endpoints[['drive.drives.hide']], params = params, base_url = 'https://www.googleapis.com/')
req <- gargle::request_build(method = req$method, path = req$path, params = req$params, body = req$body, token = httr::config(token = gargle_token), base_url = req$base_url)
res <- gargle::request_make(req, encode = 'json')
if(return_response) return(res)
httr::content(res)
}
#' Lists the user's shared drives.
#'
#' Autogenerated via \code{\link[googlePackageMaker]{package_make}}.
#'
#' @seealso \href{https://developers.google.com/drive/}{Google Documentation}
#'
#' @details
#' Authentication scopes used by this function are:
#' \itemize{
#' \item https://www.googleapis.com/auth/drive
#' \item https://www.googleapis.com/auth/drive.readonly
#' }
#' @param pageSize Maximum number of shared drives to return.
#' @param pageToken Page token for shared drives.
#' @param q Query string for searching shared drives.
#' @param useDomainAdminAccess Issue the request as a domain administrator; if set to true, then all shared drives of the domain in which the requester is an administrator are returned.
#' @param gargle_token A token prepared by one of gargle's token generating functions. Defaults to gargle::token_fetch(...) with appropriate scopes. See \code{\link[gargle]{token_fetch}} for more info.
#' @param return_response Whether to return the response or the response content. Defaults to FALSE (return response content).
#' @export
drives.list <- function(pageSize = NULL, pageToken = NULL, q = NULL, useDomainAdminAccess = NULL, gargle_token = gargle::token_fetch(scopes = .endpoints[['drive.drives.list']]$scopes), return_response = F){
params <- as.list(environment())[!names(as.list(environment())) %in% c('return_response', 'gargle_token')]
req <- gargle::request_develop(endpoint = .endpoints[['drive.drives.list']], params = params, base_url = 'https://www.googleapis.com/')
req <- gargle::request_build(method = req$method, path = req$path, params = req$params, body = req$body, token = httr::config(token = gargle_token), base_url = req$base_url)
res <- gargle::request_make(req, encode = 'json')
if(return_response) return(res)
httr::content(res)
}
#' Restores a shared drive to the default view.
#'
#' Autogenerated via \code{\link[googlePackageMaker]{package_make}}.
#'
#' @seealso \href{https://developers.google.com/drive/}{Google Documentation}
#'
#' @details
#' Authentication scopes used by this function are:
#' \itemize{
#' \item https://www.googleapis.com/auth/drive
#' }
#' @param driveId The ID of the shared drive.
#' @param gargle_token A token prepared by one of gargle's token generating functions. Defaults to gargle::token_fetch(...) with appropriate scopes. See \code{\link[gargle]{token_fetch}} for more info.
#' @param return_response Whether to return the response or the response content. Defaults to FALSE (return response content).
#' @export
drives.unhide <- function(driveId, gargle_token = gargle::token_fetch(scopes = .endpoints[['drive.drives.unhide']]$scopes), return_response = F){
params <- as.list(environment())[!names(as.list(environment())) %in% c('return_response', 'gargle_token')]
req <- gargle::request_develop(endpoint = .endpoints[['drive.drives.unhide']], params = params, base_url = 'https://www.googleapis.com/')
req <- gargle::request_build(method = req$method, path = req$path, params = req$params, body = req$body, token = httr::config(token = gargle_token), base_url = req$base_url)
res <- gargle::request_make(req, encode = 'json')
if(return_response) return(res)
httr::content(res)
}
#' Updates the metadate for a shared drive.
#'
#' Autogenerated via \code{\link[googlePackageMaker]{package_make}}.
#'
#' @seealso \href{https://developers.google.com/drive/}{Google Documentation}
#'
#' @details
#' Authentication scopes used by this function are:
#' \itemize{
#' \item https://www.googleapis.com/auth/drive
#' }
#' @param driveId The ID of the shared drive.
#' @param useDomainAdminAccess Issue the request as a domain administrator; if set to true, then the requester will be granted access if they are an administrator of the domain to which the shared drive belongs.
#' @param backgroundImageFile An image file and cropping parameters from which a background image for this shared drive is set. This is a write only field; it can only be set on drive.drives.update requests that don't set themeId. When specified, all fields of the backgroundImageFile must be set.
#' @param backgroundImageLink A short-lived link to this shared drive's background image.
#' @param capabilities Capabilities the current user has on this shared drive.
#' @param colorRgb The color of this shared drive as an RGB hex string. It can only be set on a drive.drives.update request that does not set themeId.
#' @param createdTime The time at which the shared drive was created (RFC 3339 date-time).
#' @param hidden Whether the shared drive is hidden from default view.
#' @param id The ID of this shared drive which is also the ID of the top level folder of this shared drive.
#' @param kind Identifies what kind of resource this is. Value: the fixed string "drive#drive".
#' @param name The name of this shared drive.
#' @param restrictions A set of restrictions that apply to this shared drive or items inside this shared drive.
#' @param themeId The ID of the theme from which the background image and color will be set. The set of possible driveThemes can be retrieved from a drive.about.get response. When not specified on a drive.drives.create request, a random theme is chosen from which the background image and color are set. This is a write-only field; it can only be set on requests that don't set colorRgb or backgroundImageFile.
#' @param gargle_token A token prepared by one of gargle's token generating functions. Defaults to gargle::token_fetch(...) with appropriate scopes. See \code{\link[gargle]{token_fetch}} for more info.
#' @param return_response Whether to return the response or the response content. Defaults to FALSE (return response content).
#' @export
drives.update <- function(driveId, useDomainAdminAccess = NULL, backgroundImageFile = NULL, backgroundImageLink = NULL, capabilities = NULL, colorRgb = NULL, createdTime = NULL, hidden = NULL, id = NULL, kind = NULL, name = NULL, restrictions = NULL, themeId = NULL, gargle_token = gargle::token_fetch(scopes = .endpoints[['drive.drives.update']]$scopes), return_response = F){
params <- as.list(environment())[!names(as.list(environment())) %in% c('return_response', 'gargle_token')]
req <- gargle::request_develop(endpoint = .endpoints[['drive.drives.update']], params = params, base_url = 'https://www.googleapis.com/')
req <- gargle::request_build(method = req$method, path = req$path, params = req$params, body = req$body, token = httr::config(token = gargle_token), base_url = req$base_url)
res <- gargle::request_make(req, encode = 'json')
if(return_response) return(res)
httr::content(res)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.