samples/DriveV3/R/replies.R

	#' Creates a new reply to a comment.
	#'
	#'  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.file
	#' }
	#' @param commentId The ID of the comment.
	#' @param fileId The ID of the file.
	#' @param action The action the reply performed to the parent comment. Valid values are:  - resolve - reopen
	#' @param author The author of the reply. The author's email address and permission ID will not be populated.
	#' @param content The plain text content of the reply. This field is used for setting the content, while htmlContent should be displayed. This is required on creates if no action is specified.
	#' @param createdTime The time at which the reply was created (RFC 3339 date-time).
	#' @param deleted Whether the reply has been deleted. A deleted reply has no content.
	#' @param htmlContent The content of the reply with HTML formatting.
	#' @param id The ID of the reply.
	#' @param kind Identifies what kind of resource this is. Value: the fixed string "drive#reply".
	#' @param modifiedTime The last time the reply was modified (RFC 3339 date-time).
	#' @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
	replies.create <- function(commentId, fileId, action = NULL, author = NULL, content = NULL, createdTime = NULL, deleted = NULL, htmlContent = NULL, id = NULL, kind = NULL, modifiedTime = NULL, gargle_token = gargle::token_fetch(scopes = .endpoints[['drive.replies.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.replies.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)
	}

	#' Deletes a reply.
	#'
	#'  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.file
	#' }
	#' @param commentId The ID of the comment.
	#' @param fileId The ID of the file.
	#' @param replyId The ID of the reply.
	#' @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
	replies.delete <- function(commentId, fileId, replyId, gargle_token = gargle::token_fetch(scopes = .endpoints[['drive.replies.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.replies.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 reply 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.file
	#' \item https://www.googleapis.com/auth/drive.readonly
	#' }
	#' @param commentId The ID of the comment.
	#' @param fileId The ID of the file.
	#' @param replyId The ID of the reply.
	#' @param includeDeleted Whether to return deleted replies. Deleted replies will not include their original content.
	#' @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
	replies.get <- function(commentId, fileId, replyId, includeDeleted = NULL, gargle_token = gargle::token_fetch(scopes = .endpoints[['drive.replies.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.replies.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)
	}

	#' Lists a comment's replies.
	#'
	#'  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.file
	#' \item https://www.googleapis.com/auth/drive.readonly
	#' }
	#' @param commentId The ID of the comment.
	#' @param fileId The ID of the file.
	#' @param includeDeleted Whether to include deleted replies. Deleted replies will not include their original content.
	#' @param pageSize The maximum number of replies to return per page.
	#' @param pageToken The token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response.
	#' @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
	replies.list <- function(commentId, fileId, includeDeleted = NULL, pageSize = NULL, pageToken = NULL, gargle_token = gargle::token_fetch(scopes = .endpoints[['drive.replies.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.replies.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)
	}

	#' Updates a reply with patch semantics.
	#'
	#'  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.file
	#' }
	#' @param commentId The ID of the comment.
	#' @param fileId The ID of the file.
	#' @param replyId The ID of the reply.
	#' @param action The action the reply performed to the parent comment. Valid values are:  - resolve - reopen
	#' @param author The author of the reply. The author's email address and permission ID will not be populated.
	#' @param content The plain text content of the reply. This field is used for setting the content, while htmlContent should be displayed. This is required on creates if no action is specified.
	#' @param createdTime The time at which the reply was created (RFC 3339 date-time).
	#' @param deleted Whether the reply has been deleted. A deleted reply has no content.
	#' @param htmlContent The content of the reply with HTML formatting.
	#' @param id The ID of the reply.
	#' @param kind Identifies what kind of resource this is. Value: the fixed string "drive#reply".
	#' @param modifiedTime The last time the reply was modified (RFC 3339 date-time).
	#' @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
	replies.update <- function(commentId, fileId, replyId, action = NULL, author = NULL, content = NULL, createdTime = NULL, deleted = NULL, htmlContent = NULL, id = NULL, kind = NULL, modifiedTime = NULL, gargle_token = gargle::token_fetch(scopes = .endpoints[['drive.replies.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.replies.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)
	}
samterfa/googlePackageMaker documentation built on May 18, 2022, 10:58 a.m.