#' Gets the starting pageToken for listing future changes.
#'
#' 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.appdata
#' \item https://www.googleapis.com/auth/drive.file
#' \item https://www.googleapis.com/auth/drive.metadata
#' \item https://www.googleapis.com/auth/drive.metadata.readonly
#' \item https://www.googleapis.com/auth/drive.photos.readonly
#' \item https://www.googleapis.com/auth/drive.readonly
#' }
#' @param driveId The ID of the shared drive for which the starting pageToken for listing future changes from that shared drive is returned.
#' @param supportsAllDrives Whether the requesting application supports both My Drives and shared drives.
#' @param supportsTeamDrives Deprecated use supportsAllDrives instead.
#' @param teamDriveId Deprecated use driveId instead.
#' @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
changes.getStartPageToken <- function(driveId = NULL, supportsAllDrives = NULL, supportsTeamDrives = NULL, teamDriveId = NULL, gargle_token = gargle::token_fetch(scopes = .endpoints[['drive.changes.getStartPageToken']]$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.changes.getStartPageToken']], 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 changes for a user or 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
#' \item https://www.googleapis.com/auth/drive.appdata
#' \item https://www.googleapis.com/auth/drive.file
#' \item https://www.googleapis.com/auth/drive.metadata
#' \item https://www.googleapis.com/auth/drive.metadata.readonly
#' \item https://www.googleapis.com/auth/drive.photos.readonly
#' \item https://www.googleapis.com/auth/drive.readonly
#' }
#' @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 or to the response from the getStartPageToken method.
#' @param driveId The shared drive from which changes are returned. If specified the change IDs will be reflective of the shared drive; use the combined drive ID and change ID as an identifier.
#' @param includeCorpusRemovals Whether changes should include the file resource if the file is still accessible by the user at the time of the request, even when a file was removed from the list of changes and there will be no further change entries for this file.
#' @param includeItemsFromAllDrives Whether both My Drive and shared drive items should be included in results.
#' @param includePermissionsForView Specifies which additional view's permissions to include in the response. Only 'published' is supported.
#' @param includeRemoved Whether to include changes indicating that items have been removed from the list of changes, for example by deletion or loss of access.
#' @param includeTeamDriveItems Deprecated use includeItemsFromAllDrives instead.
#' @param pageSize The maximum number of changes to return per page.
#' @param restrictToMyDrive Whether to restrict the results to changes inside the My Drive hierarchy. This omits changes to files such as those in the Application Data folder or shared files which have not been added to My Drive.
#' @param spaces A comma-separated list of spaces to query within the user corpus. Supported values are 'drive', 'appDataFolder' and 'photos'.
#' @param supportsAllDrives Whether the requesting application supports both My Drives and shared drives.
#' @param supportsTeamDrives Deprecated use supportsAllDrives instead.
#' @param teamDriveId Deprecated use driveId instead.
#' @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
changes.list <- function(pageToken, driveId = NULL, includeCorpusRemovals = NULL, includeItemsFromAllDrives = NULL, includePermissionsForView = NULL, includeRemoved = NULL, includeTeamDriveItems = NULL, pageSize = NULL, restrictToMyDrive = NULL, spaces = NULL, supportsAllDrives = NULL, supportsTeamDrives = NULL, teamDriveId = NULL, gargle_token = gargle::token_fetch(scopes = .endpoints[['drive.changes.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.changes.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)
}
#' Subscribes to changes for a user.
#'
#' 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.appdata
#' \item https://www.googleapis.com/auth/drive.file
#' \item https://www.googleapis.com/auth/drive.metadata
#' \item https://www.googleapis.com/auth/drive.metadata.readonly
#' \item https://www.googleapis.com/auth/drive.photos.readonly
#' \item https://www.googleapis.com/auth/drive.readonly
#' }
#' @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 or to the response from the getStartPageToken method.
#' @param driveId The shared drive from which changes are returned. If specified the change IDs will be reflective of the shared drive; use the combined drive ID and change ID as an identifier.
#' @param includeCorpusRemovals Whether changes should include the file resource if the file is still accessible by the user at the time of the request, even when a file was removed from the list of changes and there will be no further change entries for this file.
#' @param includeItemsFromAllDrives Whether both My Drive and shared drive items should be included in results.
#' @param includePermissionsForView Specifies which additional view's permissions to include in the response. Only 'published' is supported.
#' @param includeRemoved Whether to include changes indicating that items have been removed from the list of changes, for example by deletion or loss of access.
#' @param includeTeamDriveItems Deprecated use includeItemsFromAllDrives instead.
#' @param pageSize The maximum number of changes to return per page.
#' @param restrictToMyDrive Whether to restrict the results to changes inside the My Drive hierarchy. This omits changes to files such as those in the Application Data folder or shared files which have not been added to My Drive.
#' @param spaces A comma-separated list of spaces to query within the user corpus. Supported values are 'drive', 'appDataFolder' and 'photos'.
#' @param supportsAllDrives Whether the requesting application supports both My Drives and shared drives.
#' @param supportsTeamDrives Deprecated use supportsAllDrives instead.
#' @param teamDriveId Deprecated use driveId instead.
#' @param address The address where notifications are delivered for this channel.
#' @param expiration Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional.
#' @param id A UUID or similar unique string that identifies this channel.
#' @param kind Identifies this as a notification channel used to watch for changes to a resource, which is "api#channel".
#' @param params Additional parameters controlling delivery channel behavior. Optional.
#' @param payload A Boolean value to indicate whether payload is wanted. Optional.
#' @param resourceId An opaque ID that identifies the resource being watched on this channel. Stable across different API versions.
#' @param resourceUri A version-specific identifier for the watched resource.
#' @param token An arbitrary string delivered to the target address with each notification delivered over this channel. Optional.
#' @param type The type of delivery mechanism used for this channel.
#' @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
changes.watch <- function(pageToken, driveId = NULL, includeCorpusRemovals = NULL, includeItemsFromAllDrives = NULL, includePermissionsForView = NULL, includeRemoved = NULL, includeTeamDriveItems = NULL, pageSize = NULL, restrictToMyDrive = NULL, spaces = NULL, supportsAllDrives = NULL, supportsTeamDrives = NULL, teamDriveId = NULL, address = NULL, expiration = NULL, id = NULL, kind = NULL, params = NULL, payload = NULL, resourceId = NULL, resourceUri = NULL, token = NULL, type = NULL, gargle_token = gargle::token_fetch(scopes = .endpoints[['drive.changes.watch']]$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.changes.watch']], 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.