Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign up| #' Calendar API | |
| #' Manipulates events and other calendar data. | |
| #' | |
| #' Auto-generated code by googleAuthR::gar_create_api_skeleton | |
| #' at 2017-03-05 19:30:35 | |
| #' filename: /Users/mark/dev/R/autoGoogleAPI/googlecalendarv3.auto/R/calendar_functions.R | |
| #' api_json: api_json | |
| #' | |
| #' @details | |
| #' Authentication scopes used are: | |
| #' \itemize{ | |
| #' \item https://www.googleapis.com/auth/calendar | |
| #' \item https://www.googleapis.com/auth/calendar.readonly | |
| #' } | |
| #' | |
| #' @docType package | |
| #' @name calendar_googleAuthR | |
| #' | |
| NULL | |
| ## NULL | |
| #' A helper function that tests whether an object is either NULL _or_ | |
| #' a list of NULLs | |
| #' | |
| #' @keywords internal | |
| is.NullOb <- function(x) is.null(x) | all(sapply(x, is.null)) | |
| #' Recursively step down into list, removing all such objects | |
| #' | |
| #' @keywords internal | |
| rmNullObs <- function(x) { | |
| x <- Filter(Negate(is.NullOb), x) | |
| lapply(x, function(x) if (is.list(x)) | |
| rmNullObs(x) else x) | |
| } | |
| #' Deletes an access control rule. | |
| #' | |
| #' Autogenerated via \code{\link[googleAuthR]{gar_create_api_skeleton}} | |
| #' | |
| #' @seealso \href{https://developers.google.com/google-apps/calendar/firstapp}{Google Documentation} | |
| #' | |
| #' @details | |
| #' Authentication scopes used by this function are: | |
| #' \itemize{ | |
| #' \item https://www.googleapis.com/auth/calendar | |
| #' } | |
| #' | |
| #' Set \code{options(googleAuthR.scopes.selected = c(https://www.googleapis.com/auth/calendar)} | |
| #' Then run \code{googleAuthR::gar_auth()} to authenticate. | |
| #' See \code{\link[googleAuthR]{gar_auth}} for details. | |
| #' | |
| #' @param calendarId Calendar identifier | |
| #' @param ruleId ACL rule identifier | |
| #' @importFrom googleAuthR gar_api_generator | |
| #' @export | |
| acl.delete <- function(calendarId, ruleId) { | |
| url <- sprintf("https://www.googleapis.com/calendar/v3/calendars/%s/acl/%s", | |
| calendarId, ruleId) | |
| # calendar.acl.delete | |
| f <- googleAuthR::gar_api_generator(url, "DELETE", data_parse_function = function(x) x) | |
| f() | |
| } | |
| #' Returns an access control rule. | |
| #' | |
| #' Autogenerated via \code{\link[googleAuthR]{gar_create_api_skeleton}} | |
| #' | |
| #' @seealso \href{https://developers.google.com/google-apps/calendar/firstapp}{Google Documentation} | |
| #' | |
| #' @details | |
| #' Authentication scopes used by this function are: | |
| #' \itemize{ | |
| #' \item https://www.googleapis.com/auth/calendar | |
| #' \item https://www.googleapis.com/auth/calendar.readonly | |
| #' } | |
| #' | |
| #' Set \code{options(googleAuthR.scopes.selected = c(https://www.googleapis.com/auth/calendar, https://www.googleapis.com/auth/calendar.readonly)} | |
| #' Then run \code{googleAuthR::gar_auth()} to authenticate. | |
| #' See \code{\link[googleAuthR]{gar_auth}} for details. | |
| #' | |
| #' @param calendarId Calendar identifier | |
| #' @param ruleId ACL rule identifier | |
| #' @importFrom googleAuthR gar_api_generator | |
| #' @export | |
| acl.get <- function(calendarId, ruleId) { | |
| url <- sprintf("https://www.googleapis.com/calendar/v3/calendars/%s/acl/%s", | |
| calendarId, ruleId) | |
| # calendar.acl.get | |
| f <- googleAuthR::gar_api_generator(url, "GET", data_parse_function = function(x) x) | |
| f() | |
| } | |
| #' Creates an access control rule. | |
| #' | |
| #' Autogenerated via \code{\link[googleAuthR]{gar_create_api_skeleton}} | |
| #' | |
| #' @seealso \href{https://developers.google.com/google-apps/calendar/firstapp}{Google Documentation} | |
| #' | |
| #' @details | |
| #' Authentication scopes used by this function are: | |
| #' \itemize{ | |
| #' \item https://www.googleapis.com/auth/calendar | |
| #' } | |
| #' | |
| #' Set \code{options(googleAuthR.scopes.selected = c(https://www.googleapis.com/auth/calendar)} | |
| #' Then run \code{googleAuthR::gar_auth()} to authenticate. | |
| #' See \code{\link[googleAuthR]{gar_auth}} for details. | |
| #' | |
| #' @param AclRule The \link{AclRule} object to pass to this method | |
| #' @param calendarId Calendar identifier | |
| #' @importFrom googleAuthR gar_api_generator | |
| #' @family AclRule functions | |
| #' @export | |
| acl.insert <- function(AclRule, calendarId) { | |
| url <- sprintf("https://www.googleapis.com/calendar/v3/calendars/%s/acl", calendarId) | |
| # calendar.acl.insert | |
| f <- googleAuthR::gar_api_generator(url, "POST", data_parse_function = function(x) x) | |
| stopifnot(inherits(AclRule, "gar_AclRule")) | |
| f(the_body = AclRule) | |
| } | |
| #' Returns the rules in the access control list for the calendar. | |
| #' | |
| #' Autogenerated via \code{\link[googleAuthR]{gar_create_api_skeleton}} | |
| #' | |
| #' @seealso \href{https://developers.google.com/google-apps/calendar/firstapp}{Google Documentation} | |
| #' | |
| #' @details | |
| #' Authentication scopes used by this function are: | |
| #' \itemize{ | |
| #' \item https://www.googleapis.com/auth/calendar | |
| #' } | |
| #' | |
| #' Set \code{options(googleAuthR.scopes.selected = c(https://www.googleapis.com/auth/calendar)} | |
| #' Then run \code{googleAuthR::gar_auth()} to authenticate. | |
| #' See \code{\link[googleAuthR]{gar_auth}} for details. | |
| #' | |
| #' @param calendarId Calendar identifier | |
| #' @param maxResults Maximum number of entries returned on one result page | |
| #' @param pageToken Token specifying which result page to return | |
| #' @param showDeleted Whether to include deleted ACLs in the result | |
| #' @param syncToken Token obtained from the nextSyncToken field returned on the last page of results from the previous list request | |
| #' @importFrom googleAuthR gar_api_generator | |
| #' @export | |
| acl.list <- function(calendarId, maxResults = NULL, pageToken = NULL, showDeleted = NULL, | |
| syncToken = NULL) { | |
| url <- sprintf("https://www.googleapis.com/calendar/v3/calendars/%s/acl", calendarId) | |
| # calendar.acl.list | |
| pars = list(maxResults = maxResults, pageToken = pageToken, showDeleted = showDeleted, | |
| syncToken = syncToken) | |
| f <- googleAuthR::gar_api_generator(url, "GET", pars_args = rmNullObs(pars), | |
| data_parse_function = function(x) x) | |
| f() | |
| } | |
| #' Updates an access control rule. This method supports patch semantics. | |
| #' | |
| #' Autogenerated via \code{\link[googleAuthR]{gar_create_api_skeleton}} | |
| #' | |
| #' @seealso \href{https://developers.google.com/google-apps/calendar/firstapp}{Google Documentation} | |
| #' | |
| #' @details | |
| #' Authentication scopes used by this function are: | |
| #' \itemize{ | |
| #' \item https://www.googleapis.com/auth/calendar | |
| #' } | |
| #' | |
| #' Set \code{options(googleAuthR.scopes.selected = c(https://www.googleapis.com/auth/calendar)} | |
| #' Then run \code{googleAuthR::gar_auth()} to authenticate. | |
| #' See \code{\link[googleAuthR]{gar_auth}} for details. | |
| #' | |
| #' @param AclRule The \link{AclRule} object to pass to this method | |
| #' @param calendarId Calendar identifier | |
| #' @param ruleId ACL rule identifier | |
| #' @importFrom googleAuthR gar_api_generator | |
| #' @family AclRule functions | |
| #' @export | |
| acl.patch <- function(AclRule, calendarId, ruleId) { | |
| url <- sprintf("https://www.googleapis.com/calendar/v3/calendars/%s/acl/%s", | |
| calendarId, ruleId) | |
| # calendar.acl.patch | |
| f <- googleAuthR::gar_api_generator(url, "PATCH", data_parse_function = function(x) x) | |
| stopifnot(inherits(AclRule, "gar_AclRule")) | |
| f(the_body = AclRule) | |
| } | |
| #' Updates an access control rule. | |
| #' | |
| #' Autogenerated via \code{\link[googleAuthR]{gar_create_api_skeleton}} | |
| #' | |
| #' @seealso \href{https://developers.google.com/google-apps/calendar/firstapp}{Google Documentation} | |
| #' | |
| #' @details | |
| #' Authentication scopes used by this function are: | |
| #' \itemize{ | |
| #' \item https://www.googleapis.com/auth/calendar | |
| #' } | |
| #' | |
| #' Set \code{options(googleAuthR.scopes.selected = c(https://www.googleapis.com/auth/calendar)} | |
| #' Then run \code{googleAuthR::gar_auth()} to authenticate. | |
| #' See \code{\link[googleAuthR]{gar_auth}} for details. | |
| #' | |
| #' @param AclRule The \link{AclRule} object to pass to this method | |
| #' @param calendarId Calendar identifier | |
| #' @param ruleId ACL rule identifier | |
| #' @importFrom googleAuthR gar_api_generator | |
| #' @family AclRule functions | |
| #' @export | |
| acl.update <- function(AclRule, calendarId, ruleId) { | |
| url <- sprintf("https://www.googleapis.com/calendar/v3/calendars/%s/acl/%s", | |
| calendarId, ruleId) | |
| # calendar.acl.update | |
| f <- googleAuthR::gar_api_generator(url, "PUT", data_parse_function = function(x) x) | |
| stopifnot(inherits(AclRule, "gar_AclRule")) | |
| f(the_body = AclRule) | |
| } | |
| #' Watch for changes to ACL resources. | |
| #' | |
| #' Autogenerated via \code{\link[googleAuthR]{gar_create_api_skeleton}} | |
| #' | |
| #' @seealso \href{https://developers.google.com/google-apps/calendar/firstapp}{Google Documentation} | |
| #' | |
| #' @details | |
| #' Authentication scopes used by this function are: | |
| #' \itemize{ | |
| #' \item https://www.googleapis.com/auth/calendar | |
| #' } | |
| #' | |
| #' Set \code{options(googleAuthR.scopes.selected = c(https://www.googleapis.com/auth/calendar)} | |
| #' Then run \code{googleAuthR::gar_auth()} to authenticate. | |
| #' See \code{\link[googleAuthR]{gar_auth}} for details. | |
| #' | |
| #' @param Channel The \link{Channel} object to pass to this method | |
| #' @param calendarId Calendar identifier | |
| #' @param maxResults Maximum number of entries returned on one result page | |
| #' @param pageToken Token specifying which result page to return | |
| #' @param showDeleted Whether to include deleted ACLs in the result | |
| #' @param syncToken Token obtained from the nextSyncToken field returned on the last page of results from the previous list request | |
| #' @importFrom googleAuthR gar_api_generator | |
| #' @family Channel functions | |
| #' @export | |
| acl.watch <- function(Channel, calendarId, maxResults = NULL, pageToken = NULL, showDeleted = NULL, | |
| syncToken = NULL) { | |
| url <- sprintf("https://www.googleapis.com/calendar/v3/calendars/%s/acl/watch", | |
| calendarId) | |
| # calendar.acl.watch | |
| pars = list(maxResults = maxResults, pageToken = pageToken, showDeleted = showDeleted, | |
| syncToken = syncToken) | |
| f <- googleAuthR::gar_api_generator(url, "POST", pars_args = rmNullObs(pars), | |
| data_parse_function = function(x) x) | |
| stopifnot(inherits(Channel, "gar_Channel")) | |
| f(the_body = Channel) | |
| } | |
| #' Deletes an entry on the user's calendar list. | |
| #' | |
| #' Autogenerated via \code{\link[googleAuthR]{gar_create_api_skeleton}} | |
| #' | |
| #' @seealso \href{https://developers.google.com/google-apps/calendar/firstapp}{Google Documentation} | |
| #' | |
| #' @details | |
| #' Authentication scopes used by this function are: | |
| #' \itemize{ | |
| #' \item https://www.googleapis.com/auth/calendar | |
| #' } | |
| #' | |
| #' Set \code{options(googleAuthR.scopes.selected = c(https://www.googleapis.com/auth/calendar)} | |
| #' Then run \code{googleAuthR::gar_auth()} to authenticate. | |
| #' See \code{\link[googleAuthR]{gar_auth}} for details. | |
| #' | |
| #' @param calendarId Calendar identifier | |
| #' @importFrom googleAuthR gar_api_generator | |
| #' @export | |
| ist.delete <- function(calendarId) { | |
| url <- sprintf("https://www.googleapis.com/calendar/v3/users/me/calendarList/%s", | |
| calendarId) | |
| # calendar.calendarList.delete | |
| f <- googleAuthR::gar_api_generator(url, "DELETE", data_parse_function = function(x) x) | |
| f() | |
| } | |
| #' Returns an entry on the user's calendar list. | |
| #' | |
| #' Autogenerated via \code{\link[googleAuthR]{gar_create_api_skeleton}} | |
| #' | |
| #' @seealso \href{https://developers.google.com/google-apps/calendar/firstapp}{Google Documentation} | |
| #' | |
| #' @details | |
| #' Authentication scopes used by this function are: | |
| #' \itemize{ | |
| #' \item https://www.googleapis.com/auth/calendar | |
| #' \item https://www.googleapis.com/auth/calendar.readonly | |
| #' } | |
| #' | |
| #' Set \code{options(googleAuthR.scopes.selected = c(https://www.googleapis.com/auth/calendar, https://www.googleapis.com/auth/calendar.readonly)} | |
| #' Then run \code{googleAuthR::gar_auth()} to authenticate. | |
| #' See \code{\link[googleAuthR]{gar_auth}} for details. | |
| #' | |
| #' @param calendarId Calendar identifier | |
| #' @importFrom googleAuthR gar_api_generator | |
| #' @export | |
| ist.get <- function(calendarId) { | |
| url <- sprintf("https://www.googleapis.com/calendar/v3/users/me/calendarList/%s", | |
| calendarId) | |
| # calendar.calendarList.get | |
| f <- googleAuthR::gar_api_generator(url, "GET", data_parse_function = function(x) x) | |
| f() | |
| } | |
| #' Adds an entry to the user's calendar list. | |
| #' | |
| #' Autogenerated via \code{\link[googleAuthR]{gar_create_api_skeleton}} | |
| #' | |
| #' @seealso \href{https://developers.google.com/google-apps/calendar/firstapp}{Google Documentation} | |
| #' | |
| #' @details | |
| #' Authentication scopes used by this function are: | |
| #' \itemize{ | |
| #' \item https://www.googleapis.com/auth/calendar | |
| #' } | |
| #' | |
| #' Set \code{options(googleAuthR.scopes.selected = c(https://www.googleapis.com/auth/calendar)} | |
| #' Then run \code{googleAuthR::gar_auth()} to authenticate. | |
| #' See \code{\link[googleAuthR]{gar_auth}} for details. | |
| #' | |
| #' @param CalendarListEntry The \link{CalendarListEntry} object to pass to this method | |
| #' @param colorRgbFormat Whether to use the foregroundColor and backgroundColor fields to write the calendar colors (RGB) | |
| #' @importFrom googleAuthR gar_api_generator | |
| #' @family CalendarListEntry functions | |
| #' @export | |
| ist.insert <- function(CalendarListEntry, colorRgbFormat = NULL) { | |
| url <- "https://www.googleapis.com/calendar/v3/users/me/calendarList" | |
| # calendar.calendarList.insert | |
| pars = list(colorRgbFormat = colorRgbFormat) | |
| f <- googleAuthR::gar_api_generator(url, "POST", pars_args = rmNullObs(pars), | |
| data_parse_function = function(x) x) | |
| stopifnot(inherits(CalendarListEntry, "gar_CalendarListEntry")) | |
| f(the_body = CalendarListEntry) | |
| } | |
| #' Returns entries on the user's calendar list. | |
| #' | |
| #' Autogenerated via \code{\link[googleAuthR]{gar_create_api_skeleton}} | |
| #' | |
| #' @seealso \href{https://developers.google.com/google-apps/calendar/firstapp}{Google Documentation} | |
| #' | |
| #' @details | |
| #' Authentication scopes used by this function are: | |
| #' \itemize{ | |
| #' \item https://www.googleapis.com/auth/calendar | |
| #' \item https://www.googleapis.com/auth/calendar.readonly | |
| #' } | |
| #' | |
| #' Set \code{options(googleAuthR.scopes.selected = c(https://www.googleapis.com/auth/calendar, https://www.googleapis.com/auth/calendar.readonly)} | |
| #' Then run \code{googleAuthR::gar_auth()} to authenticate. | |
| #' See \code{\link[googleAuthR]{gar_auth}} for details. | |
| #' | |
| #' @param maxResults Maximum number of entries returned on one result page | |
| #' @param minAccessRole The minimum access role for the user in the returned entries | |
| #' @param pageToken Token specifying which result page to return | |
| #' @param showDeleted Whether to include deleted calendar list entries in the result | |
| #' @param showHidden Whether to show hidden entries | |
| #' @param syncToken Token obtained from the nextSyncToken field returned on the last page of results from the previous list request | |
| #' @importFrom googleAuthR gar_api_generator | |
| #' @export | |
| ist.list <- function(maxResults = NULL, minAccessRole = NULL, pageToken = NULL, showDeleted = NULL, | |
| showHidden = NULL, syncToken = NULL) { | |
| url <- "https://www.googleapis.com/calendar/v3/users/me/calendarList" | |
| # calendar.calendarList.list | |
| pars = list(maxResults = maxResults, minAccessRole = minAccessRole, pageToken = pageToken, | |
| showDeleted = showDeleted, showHidden = showHidden, syncToken = syncToken) | |
| f <- googleAuthR::gar_api_generator(url, "GET", pars_args = rmNullObs(pars), | |
| data_parse_function = function(x) x) | |
| f() | |
| } | |
| #' Updates an entry on the user's calendar list. This method supports patch semantics. | |
| #' | |
| #' Autogenerated via \code{\link[googleAuthR]{gar_create_api_skeleton}} | |
| #' | |
| #' @seealso \href{https://developers.google.com/google-apps/calendar/firstapp}{Google Documentation} | |
| #' | |
| #' @details | |
| #' Authentication scopes used by this function are: | |
| #' \itemize{ | |
| #' \item https://www.googleapis.com/auth/calendar | |
| #' } | |
| #' | |
| #' Set \code{options(googleAuthR.scopes.selected = c(https://www.googleapis.com/auth/calendar)} | |
| #' Then run \code{googleAuthR::gar_auth()} to authenticate. | |
| #' See \code{\link[googleAuthR]{gar_auth}} for details. | |
| #' | |
| #' @param CalendarListEntry The \link{CalendarListEntry} object to pass to this method | |
| #' @param calendarId Calendar identifier | |
| #' @param colorRgbFormat Whether to use the foregroundColor and backgroundColor fields to write the calendar colors (RGB) | |
| #' @importFrom googleAuthR gar_api_generator | |
| #' @family CalendarListEntry functions | |
| #' @export | |
| ist.patch <- function(CalendarListEntry, calendarId, colorRgbFormat = NULL) { | |
| url <- sprintf("https://www.googleapis.com/calendar/v3/users/me/calendarList/%s", | |
| calendarId) | |
| # calendar.calendarList.patch | |
| pars = list(colorRgbFormat = colorRgbFormat) | |
| f <- googleAuthR::gar_api_generator(url, "PATCH", pars_args = rmNullObs(pars), | |
| data_parse_function = function(x) x) | |
| stopifnot(inherits(CalendarListEntry, "gar_CalendarListEntry")) | |
| f(the_body = CalendarListEntry) | |
| } | |
| #' Updates an entry on the user's calendar list. | |
| #' | |
| #' Autogenerated via \code{\link[googleAuthR]{gar_create_api_skeleton}} | |
| #' | |
| #' @seealso \href{https://developers.google.com/google-apps/calendar/firstapp}{Google Documentation} | |
| #' | |
| #' @details | |
| #' Authentication scopes used by this function are: | |
| #' \itemize{ | |
| #' \item https://www.googleapis.com/auth/calendar | |
| #' } | |
| #' | |
| #' Set \code{options(googleAuthR.scopes.selected = c(https://www.googleapis.com/auth/calendar)} | |
| #' Then run \code{googleAuthR::gar_auth()} to authenticate. | |
| #' See \code{\link[googleAuthR]{gar_auth}} for details. | |
| #' | |
| #' @param CalendarListEntry The \link{CalendarListEntry} object to pass to this method | |
| #' @param calendarId Calendar identifier | |
| #' @param colorRgbFormat Whether to use the foregroundColor and backgroundColor fields to write the calendar colors (RGB) | |
| #' @importFrom googleAuthR gar_api_generator | |
| #' @family CalendarListEntry functions | |
| #' @export | |
| ist.update <- function(CalendarListEntry, calendarId, colorRgbFormat = NULL) { | |
| url <- sprintf("https://www.googleapis.com/calendar/v3/users/me/calendarList/%s", | |
| calendarId) | |
| # calendar.calendarList.update | |
| pars = list(colorRgbFormat = colorRgbFormat) | |
| f <- googleAuthR::gar_api_generator(url, "PUT", pars_args = rmNullObs(pars), | |
| data_parse_function = function(x) x) | |
| stopifnot(inherits(CalendarListEntry, "gar_CalendarListEntry")) | |
| f(the_body = CalendarListEntry) | |
| } | |
| #' Watch for changes to CalendarList resources. | |
| #' | |
| #' Autogenerated via \code{\link[googleAuthR]{gar_create_api_skeleton}} | |
| #' | |
| #' @seealso \href{https://developers.google.com/google-apps/calendar/firstapp}{Google Documentation} | |
| #' | |
| #' @details | |
| #' Authentication scopes used by this function are: | |
| #' \itemize{ | |
| #' \item https://www.googleapis.com/auth/calendar | |
| #' \item https://www.googleapis.com/auth/calendar.readonly | |
| #' } | |
| #' | |
| #' Set \code{options(googleAuthR.scopes.selected = c(https://www.googleapis.com/auth/calendar, https://www.googleapis.com/auth/calendar.readonly)} | |
| #' Then run \code{googleAuthR::gar_auth()} to authenticate. | |
| #' See \code{\link[googleAuthR]{gar_auth}} for details. | |
| #' | |
| #' @param Channel The \link{Channel} object to pass to this method | |
| #' @param maxResults Maximum number of entries returned on one result page | |
| #' @param minAccessRole The minimum access role for the user in the returned entries | |
| #' @param pageToken Token specifying which result page to return | |
| #' @param showDeleted Whether to include deleted calendar list entries in the result | |
| #' @param showHidden Whether to show hidden entries | |
| #' @param syncToken Token obtained from the nextSyncToken field returned on the last page of results from the previous list request | |
| #' @importFrom googleAuthR gar_api_generator | |
| #' @family Channel functions | |
| #' @export | |
| ist.watch <- function(Channel, maxResults = NULL, minAccessRole = NULL, pageToken = NULL, | |
| showDeleted = NULL, showHidden = NULL, syncToken = NULL) { | |
| url <- "https://www.googleapis.com/calendar/v3/users/me/calendarList/watch" | |
| # calendar.calendarList.watch | |
| pars = list(maxResults = maxResults, minAccessRole = minAccessRole, pageToken = pageToken, | |
| showDeleted = showDeleted, showHidden = showHidden, syncToken = syncToken) | |
| f <- googleAuthR::gar_api_generator(url, "POST", pars_args = rmNullObs(pars), | |
| data_parse_function = function(x) x) | |
| stopifnot(inherits(Channel, "gar_Channel")) | |
| f(the_body = Channel) | |
| } | |
| #' Clears a primary calendar. This operation deletes all events associated with the primary calendar of an account. | |
| #' | |
| #' Autogenerated via \code{\link[googleAuthR]{gar_create_api_skeleton}} | |
| #' | |
| #' @seealso \href{https://developers.google.com/google-apps/calendar/firstapp}{Google Documentation} | |
| #' | |
| #' @details | |
| #' Authentication scopes used by this function are: | |
| #' \itemize{ | |
| #' \item https://www.googleapis.com/auth/calendar | |
| #' } | |
| #' | |
| #' Set \code{options(googleAuthR.scopes.selected = c(https://www.googleapis.com/auth/calendar)} | |
| #' Then run \code{googleAuthR::gar_auth()} to authenticate. | |
| #' See \code{\link[googleAuthR]{gar_auth}} for details. | |
| #' | |
| #' @param calendarId Calendar identifier | |
| #' @importFrom googleAuthR gar_api_generator | |
| #' @export | |
| .clear <- function(calendarId) { | |
| url <- sprintf("https://www.googleapis.com/calendar/v3/calendars/%s/clear", calendarId) | |
| # calendar.calendars.clear | |
| f <- googleAuthR::gar_api_generator(url, "POST", data_parse_function = function(x) x) | |
| f() | |
| } | |
| #' Deletes a secondary calendar. Use calendars.clear for clearing all events on primary calendars. | |
| #' | |
| #' Autogenerated via \code{\link[googleAuthR]{gar_create_api_skeleton}} | |
| #' | |
| #' @seealso \href{https://developers.google.com/google-apps/calendar/firstapp}{Google Documentation} | |
| #' | |
| #' @details | |
| #' Authentication scopes used by this function are: | |
| #' \itemize{ | |
| #' \item https://www.googleapis.com/auth/calendar | |
| #' } | |
| #' | |
| #' Set \code{options(googleAuthR.scopes.selected = c(https://www.googleapis.com/auth/calendar)} | |
| #' Then run \code{googleAuthR::gar_auth()} to authenticate. | |
| #' See \code{\link[googleAuthR]{gar_auth}} for details. | |
| #' | |
| #' @param calendarId Calendar identifier | |
| #' @importFrom googleAuthR gar_api_generator | |
| #' @export | |
| .delete <- function(calendarId) { | |
| url <- sprintf("https://www.googleapis.com/calendar/v3/calendars/%s", calendarId) | |
| # calendar.calendars.delete | |
| f <- googleAuthR::gar_api_generator(url, "DELETE", data_parse_function = function(x) x) | |
| f() | |
| } | |
| #' Returns metadata for a calendar. | |
| #' | |
| #' Autogenerated via \code{\link[googleAuthR]{gar_create_api_skeleton}} | |
| #' | |
| #' @seealso \href{https://developers.google.com/google-apps/calendar/firstapp}{Google Documentation} | |
| #' | |
| #' @details | |
| #' Authentication scopes used by this function are: | |
| #' \itemize{ | |
| #' \item https://www.googleapis.com/auth/calendar | |
| #' \item https://www.googleapis.com/auth/calendar.readonly | |
| #' } | |
| #' | |
| #' Set \code{options(googleAuthR.scopes.selected = c(https://www.googleapis.com/auth/calendar, https://www.googleapis.com/auth/calendar.readonly)} | |
| #' Then run \code{googleAuthR::gar_auth()} to authenticate. | |
| #' See \code{\link[googleAuthR]{gar_auth}} for details. | |
| #' | |
| #' @param calendarId Calendar identifier | |
| #' @importFrom googleAuthR gar_api_generator | |
| #' @export | |
| .get <- function(calendarId) { | |
| url <- sprintf("https://www.googleapis.com/calendar/v3/calendars/%s", calendarId) | |
| # calendar.calendars.get | |
| f <- googleAuthR::gar_api_generator(url, "GET", data_parse_function = function(x) x) | |
| f() | |
| } | |
| #' Creates a secondary calendar. | |
| #' | |
| #' Autogenerated via \code{\link[googleAuthR]{gar_create_api_skeleton}} | |
| #' | |
| #' @seealso \href{https://developers.google.com/google-apps/calendar/firstapp}{Google Documentation} | |
| #' | |
| #' @details | |
| #' Authentication scopes used by this function are: | |
| #' \itemize{ | |
| #' \item https://www.googleapis.com/auth/calendar | |
| #' } | |
| #' | |
| #' Set \code{options(googleAuthR.scopes.selected = c(https://www.googleapis.com/auth/calendar)} | |
| #' Then run \code{googleAuthR::gar_auth()} to authenticate. | |
| #' See \code{\link[googleAuthR]{gar_auth}} for details. | |
| #' | |
| #' @param Calendar The \link{Calendar} object to pass to this method | |
| #' #' @importFrom googleAuthR gar_api_generator | |
| #' @family Calendar functions | |
| #' @export | |
| .insert <- function(Calendar) { | |
| url <- "https://www.googleapis.com/calendar/v3/calendars" | |
| # calendar.calendars.insert | |
| f <- googleAuthR::gar_api_generator(url, "POST", data_parse_function = function(x) x) | |
| stopifnot(inherits(Calendar, "gar_Calendar")) | |
| f(the_body = Calendar) | |
| } | |
| #' Updates metadata for a calendar. This method supports patch semantics. | |
| #' | |
| #' Autogenerated via \code{\link[googleAuthR]{gar_create_api_skeleton}} | |
| #' | |
| #' @seealso \href{https://developers.google.com/google-apps/calendar/firstapp}{Google Documentation} | |
| #' | |
| #' @details | |
| #' Authentication scopes used by this function are: | |
| #' \itemize{ | |
| #' \item https://www.googleapis.com/auth/calendar | |
| #' } | |
| #' | |
| #' Set \code{options(googleAuthR.scopes.selected = c(https://www.googleapis.com/auth/calendar)} | |
| #' Then run \code{googleAuthR::gar_auth()} to authenticate. | |
| #' See \code{\link[googleAuthR]{gar_auth}} for details. | |
| #' | |
| #' @param Calendar The \link{Calendar} object to pass to this method | |
| #' @param calendarId Calendar identifier | |
| #' @importFrom googleAuthR gar_api_generator | |
| #' @family Calendar functions | |
| #' @export | |
| .patch <- function(Calendar, calendarId) { | |
| url <- sprintf("https://www.googleapis.com/calendar/v3/calendars/%s", calendarId) | |
| # calendar.calendars.patch | |
| f <- googleAuthR::gar_api_generator(url, "PATCH", data_parse_function = function(x) x) | |
| stopifnot(inherits(Calendar, "gar_Calendar")) | |
| f(the_body = Calendar) | |
| } | |
| #' Updates metadata for a calendar. | |
| #' | |
| #' Autogenerated via \code{\link[googleAuthR]{gar_create_api_skeleton}} | |
| #' | |
| #' @seealso \href{https://developers.google.com/google-apps/calendar/firstapp}{Google Documentation} | |
| #' | |
| #' @details | |
| #' Authentication scopes used by this function are: | |
| #' \itemize{ | |
| #' \item https://www.googleapis.com/auth/calendar | |
| #' } | |
| #' | |
| #' Set \code{options(googleAuthR.scopes.selected = c(https://www.googleapis.com/auth/calendar)} | |
| #' Then run \code{googleAuthR::gar_auth()} to authenticate. | |
| #' See \code{\link[googleAuthR]{gar_auth}} for details. | |
| #' | |
| #' @param Calendar The \link{Calendar} object to pass to this method | |
| #' @param calendarId Calendar identifier | |
| #' @importFrom googleAuthR gar_api_generator | |
| #' @family Calendar functions | |
| #' @export | |
| .update <- function(Calendar, calendarId) { | |
| url <- sprintf("https://www.googleapis.com/calendar/v3/calendars/%s", calendarId) | |
| # calendar.calendars.update | |
| f <- googleAuthR::gar_api_generator(url, "PUT", data_parse_function = function(x) x) | |
| stopifnot(inherits(Calendar, "gar_Calendar")) | |
| f(the_body = Calendar) | |
| } | |
| #' Stop watching resources through this channel | |
| #' | |
| #' Autogenerated via \code{\link[googleAuthR]{gar_create_api_skeleton}} | |
| #' | |
| #' @seealso \href{https://developers.google.com/google-apps/calendar/firstapp}{Google Documentation} | |
| #' | |
| #' @details | |
| #' Authentication scopes used by this function are: | |
| #' \itemize{ | |
| #' \item https://www.googleapis.com/auth/calendar | |
| #' \item https://www.googleapis.com/auth/calendar.readonly | |
| #' } | |
| #' | |
| #' Set \code{options(googleAuthR.scopes.selected = c(https://www.googleapis.com/auth/calendar, https://www.googleapis.com/auth/calendar.readonly)} | |
| #' Then run \code{googleAuthR::gar_auth()} to authenticate. | |
| #' See \code{\link[googleAuthR]{gar_auth}} for details. | |
| #' | |
| #' @param Channel The \link{Channel} object to pass to this method | |
| #' #' @importFrom googleAuthR gar_api_generator | |
| #' @family Channel functions | |
| #' @export | |
| channels.stop <- function(Channel) { | |
| url <- "https://www.googleapis.com/calendar/v3/channels/stop" | |
| # calendar.channels.stop | |
| f <- googleAuthR::gar_api_generator(url, "POST", data_parse_function = function(x) x) | |
| stopifnot(inherits(Channel, "gar_Channel")) | |
| f(the_body = Channel) | |
| } | |
| #' Returns the color definitions for calendars and events. | |
| #' | |
| #' Autogenerated via \code{\link[googleAuthR]{gar_create_api_skeleton}} | |
| #' | |
| #' @seealso \href{https://developers.google.com/google-apps/calendar/firstapp}{Google Documentation} | |
| #' | |
| #' @details | |
| #' Authentication scopes used by this function are: | |
| #' \itemize{ | |
| #' \item https://www.googleapis.com/auth/calendar | |
| #' \item https://www.googleapis.com/auth/calendar.readonly | |
| #' } | |
| #' | |
| #' Set \code{options(googleAuthR.scopes.selected = c(https://www.googleapis.com/auth/calendar, https://www.googleapis.com/auth/calendar.readonly)} | |
| #' Then run \code{googleAuthR::gar_auth()} to authenticate. | |
| #' See \code{\link[googleAuthR]{gar_auth}} for details. | |
| #' | |
| #' #' @importFrom googleAuthR gar_api_generator | |
| #' @export | |
| colors.get <- function() { | |
| url <- "https://www.googleapis.com/calendar/v3/colors" | |
| # calendar.colors.get | |
| f <- googleAuthR::gar_api_generator(url, "GET", data_parse_function = function(x) x) | |
| f() | |
| } | |
| #' Deletes an event. | |
| #' | |
| #' Autogenerated via \code{\link[googleAuthR]{gar_create_api_skeleton}} | |
| #' | |
| #' @seealso \href{https://developers.google.com/google-apps/calendar/firstapp}{Google Documentation} | |
| #' | |
| #' @details | |
| #' Authentication scopes used by this function are: | |
| #' \itemize{ | |
| #' \item https://www.googleapis.com/auth/calendar | |
| #' } | |
| #' | |
| #' Set \code{options(googleAuthR.scopes.selected = c(https://www.googleapis.com/auth/calendar)} | |
| #' Then run \code{googleAuthR::gar_auth()} to authenticate. | |
| #' See \code{\link[googleAuthR]{gar_auth}} for details. | |
| #' | |
| #' @param calendarId Calendar identifier | |
| #' @param eventId Event identifier | |
| #' @param sendNotifications Whether to send notifications about the deletion of the event | |
| #' @importFrom googleAuthR gar_api_generator | |
| #' @export | |
| events.delete <- function(calendarId, eventId, sendNotifications = NULL) { | |
| url <- sprintf("https://www.googleapis.com/calendar/v3/calendars/%s/events/%s", | |
| calendarId, eventId) | |
| # calendar.events.delete | |
| pars = list(sendNotifications = sendNotifications) | |
| f <- googleAuthR::gar_api_generator(url, "DELETE", pars_args = rmNullObs(pars), | |
| data_parse_function = function(x) x) | |
| f() | |
| } | |
| #' Returns an event. | |
| #' | |
| #' Autogenerated via \code{\link[googleAuthR]{gar_create_api_skeleton}} | |
| #' | |
| #' @seealso \href{https://developers.google.com/google-apps/calendar/firstapp}{Google Documentation} | |
| #' | |
| #' @details | |
| #' Authentication scopes used by this function are: | |
| #' \itemize{ | |
| #' \item https://www.googleapis.com/auth/calendar | |
| #' \item https://www.googleapis.com/auth/calendar.readonly | |
| #' } | |
| #' | |
| #' Set \code{options(googleAuthR.scopes.selected = c(https://www.googleapis.com/auth/calendar, https://www.googleapis.com/auth/calendar.readonly)} | |
| #' Then run \code{googleAuthR::gar_auth()} to authenticate. | |
| #' See \code{\link[googleAuthR]{gar_auth}} for details. | |
| #' | |
| #' @param calendarId Calendar identifier | |
| #' @param eventId Event identifier | |
| #' @param alwaysIncludeEmail Whether to always include a value in the email field for the organizer, creator and attendees, even if no real email is available (i | |
| #' @param maxAttendees The maximum number of attendees to include in the response | |
| #' @param timeZone Time zone used in the response | |
| #' @importFrom googleAuthR gar_api_generator | |
| #' @export | |
| events.get <- function(calendarId, eventId, alwaysIncludeEmail = NULL, maxAttendees = NULL, | |
| timeZone = NULL) { | |
| url <- sprintf("https://www.googleapis.com/calendar/v3/calendars/%s/events/%s", | |
| calendarId, eventId) | |
| # calendar.events.get | |
| pars = list(alwaysIncludeEmail = alwaysIncludeEmail, maxAttendees = maxAttendees, | |
| timeZone = timeZone) | |
| f <- googleAuthR::gar_api_generator(url, "GET", pars_args = rmNullObs(pars), | |
| data_parse_function = function(x) x) | |
| f() | |
| } | |
| #' Imports an event. This operation is used to add a private copy of an existing event to a calendar. | |
| #' | |
| #' Autogenerated via \code{\link[googleAuthR]{gar_create_api_skeleton}} | |
| #' | |
| #' @seealso \href{https://developers.google.com/google-apps/calendar/firstapp}{Google Documentation} | |
| #' | |
| #' @details | |
| #' Authentication scopes used by this function are: | |
| #' \itemize{ | |
| #' \item https://www.googleapis.com/auth/calendar | |
| #' } | |
| #' | |
| #' Set \code{options(googleAuthR.scopes.selected = c(https://www.googleapis.com/auth/calendar)} | |
| #' Then run \code{googleAuthR::gar_auth()} to authenticate. | |
| #' See \code{\link[googleAuthR]{gar_auth}} for details. | |
| #' | |
| #' @param Event The \link{Event} object to pass to this method | |
| #' @param calendarId Calendar identifier | |
| #' @param supportsAttachments Whether API client performing operation supports event attachments | |
| #' @importFrom googleAuthR gar_api_generator | |
| #' @family Event functions | |
| #' @export | |
| events.import <- function(Event, calendarId, supportsAttachments = NULL) { | |
| url <- sprintf("https://www.googleapis.com/calendar/v3/calendars/%s/events/import", | |
| calendarId) | |
| # calendar.events.import | |
| pars = list(supportsAttachments = supportsAttachments) | |
| f <- googleAuthR::gar_api_generator(url, "POST", pars_args = rmNullObs(pars), | |
| data_parse_function = function(x) x) | |
| stopifnot(inherits(Event, "gar_Event")) | |
| f(the_body = Event) | |
| } | |
| #' Creates an event. | |
| #' | |
| #' Autogenerated via \code{\link[googleAuthR]{gar_create_api_skeleton}} | |
| #' | |
| #' @seealso \href{https://developers.google.com/google-apps/calendar/firstapp}{Google Documentation} | |
| #' | |
| #' @details | |
| #' Authentication scopes used by this function are: | |
| #' \itemize{ | |
| #' \item https://www.googleapis.com/auth/calendar | |
| #' } | |
| #' | |
| #' Set \code{options(googleAuthR.scopes.selected = c(https://www.googleapis.com/auth/calendar)} | |
| #' Then run \code{googleAuthR::gar_auth()} to authenticate. | |
| #' See \code{\link[googleAuthR]{gar_auth}} for details. | |
| #' | |
| #' @param Event The \link{Event} object to pass to this method | |
| #' @param calendarId Calendar identifier | |
| #' @param maxAttendees The maximum number of attendees to include in the response | |
| #' @param sendNotifications Whether to send notifications about the creation of the new event | |
| #' @param supportsAttachments Whether API client performing operation supports event attachments | |
| #' @importFrom googleAuthR gar_api_generator | |
| #' @family Event functions | |
| #' @export | |
| events.insert <- function(Event, calendarId, maxAttendees = NULL, sendNotifications = NULL, | |
| supportsAttachments = NULL) { | |
| url <- sprintf("https://www.googleapis.com/calendar/v3/calendars/%s/events", | |
| calendarId) | |
| # calendar.events.insert | |
| pars = list(maxAttendees = maxAttendees, sendNotifications = sendNotifications, | |
| supportsAttachments = supportsAttachments) | |
| f <- googleAuthR::gar_api_generator(url, "POST", pars_args = rmNullObs(pars), | |
| data_parse_function = function(x) x) | |
| stopifnot(inherits(Event, "gar_Event")) | |
| f(the_body = Event) | |
| } | |
| #' Returns instances of the specified recurring event. | |
| #' | |
| #' Autogenerated via \code{\link[googleAuthR]{gar_create_api_skeleton}} | |
| #' | |
| #' @seealso \href{https://developers.google.com/google-apps/calendar/firstapp}{Google Documentation} | |
| #' | |
| #' @details | |
| #' Authentication scopes used by this function are: | |
| #' \itemize{ | |
| #' \item https://www.googleapis.com/auth/calendar | |
| #' \item https://www.googleapis.com/auth/calendar.readonly | |
| #' } | |
| #' | |
| #' Set \code{options(googleAuthR.scopes.selected = c(https://www.googleapis.com/auth/calendar, https://www.googleapis.com/auth/calendar.readonly)} | |
| #' Then run \code{googleAuthR::gar_auth()} to authenticate. | |
| #' See \code{\link[googleAuthR]{gar_auth}} for details. | |
| #' | |
| #' @param calendarId Calendar identifier | |
| #' @param eventId Recurring event identifier | |
| #' @param alwaysIncludeEmail Whether to always include a value in the email field for the organizer, creator and attendees, even if no real email is available (i | |
| #' @param maxAttendees The maximum number of attendees to include in the response | |
| #' @param maxResults Maximum number of events returned on one result page | |
| #' @param originalStart The original start time of the instance in the result | |
| #' @param pageToken Token specifying which result page to return | |
| #' @param showDeleted Whether to include deleted events (with status equals 'cancelled') in the result | |
| #' @param timeMax Upper bound (exclusive) for an event's start time to filter by | |
| #' @param timeMin Lower bound (inclusive) for an event's end time to filter by | |
| #' @param timeZone Time zone used in the response | |
| #' @importFrom googleAuthR gar_api_generator | |
| #' @export | |
| events.instances <- function(calendarId, eventId, alwaysIncludeEmail = NULL, maxAttendees = NULL, | |
| maxResults = NULL, originalStart = NULL, pageToken = NULL, showDeleted = NULL, | |
| timeMax = NULL, timeMin = NULL, timeZone = NULL) { | |
| url <- sprintf("https://www.googleapis.com/calendar/v3/calendars/%s/events/%s/instances", | |
| calendarId, eventId) | |
| # calendar.events.instances | |
| pars = list(alwaysIncludeEmail = alwaysIncludeEmail, maxAttendees = maxAttendees, | |
| maxResults = maxResults, originalStart = originalStart, pageToken = pageToken, | |
| showDeleted = showDeleted, timeMax = timeMax, timeMin = timeMin, timeZone = timeZone) | |
| f <- googleAuthR::gar_api_generator(url, "GET", pars_args = rmNullObs(pars), | |
| data_parse_function = function(x) x) | |
| f() | |
| } | |
| #' Returns events on the specified calendar. | |
| #' | |
| #' Autogenerated via \code{\link[googleAuthR]{gar_create_api_skeleton}} | |
| #' | |
| #' @seealso \href{https://developers.google.com/google-apps/calendar/firstapp}{Google Documentation} | |
| #' | |
| #' @details | |
| #' Authentication scopes used by this function are: | |
| #' \itemize{ | |
| #' \item https://www.googleapis.com/auth/calendar | |
| #' \item https://www.googleapis.com/auth/calendar.readonly | |
| #' } | |
| #' | |
| #' Set \code{options(googleAuthR.scopes.selected = c(https://www.googleapis.com/auth/calendar, https://www.googleapis.com/auth/calendar.readonly)} | |
| #' Then run \code{googleAuthR::gar_auth()} to authenticate. | |
| #' See \code{\link[googleAuthR]{gar_auth}} for details. | |
| #' | |
| #' @param calendarId Calendar identifier | |
| #' @param alwaysIncludeEmail Whether to always include a value in the email field for the organizer, creator and attendees, even if no real email is available (i | |
| #' @param iCalUID Specifies event ID in the iCalendar format to be included in the response | |
| #' @param maxAttendees The maximum number of attendees to include in the response | |
| #' @param maxResults Maximum number of events returned on one result page | |
| #' @param orderBy The order of the events returned in the result | |
| #' @param pageToken Token specifying which result page to return | |
| #' @param privateExtendedProperty Extended properties constraint specified as propertyName=value | |
| #' @param q Free text search terms to find events that match these terms in any field, except for extended properties | |
| #' @param sharedExtendedProperty Extended properties constraint specified as propertyName=value | |
| #' @param showDeleted Whether to include deleted events (with status equals 'cancelled') in the result | |
| #' @param showHiddenInvitations Whether to include hidden invitations in the result | |
| #' @param singleEvents Whether to expand recurring events into instances and only return single one-off events and instances of recurring events, but not the underlying recurring events themselves | |
| #' @param syncToken Token obtained from the nextSyncToken field returned on the last page of results from the previous list request | |
| #' @param timeMax Upper bound (exclusive) for an event's start time to filter by | |
| #' @param timeMin Lower bound (inclusive) for an event's end time to filter by | |
| #' @param timeZone Time zone used in the response | |
| #' @param updatedMin Lower bound for an event's last modification time (as a RFC3339 timestamp) to filter by | |
| #' @importFrom googleAuthR gar_api_generator | |
| #' @export | |
| events.list <- function(calendarId, alwaysIncludeEmail = NULL, iCalUID = NULL, maxAttendees = NULL, | |
| maxResults = NULL, orderBy = NULL, pageToken = NULL, privateExtendedProperty = NULL, | |
| q = NULL, sharedExtendedProperty = NULL, showDeleted = NULL, showHiddenInvitations = NULL, | |
| singleEvents = NULL, syncToken = NULL, timeMax = NULL, timeMin = NULL, timeZone = NULL, | |
| updatedMin = NULL) { | |
| url <- sprintf("https://www.googleapis.com/calendar/v3/calendars/%s/events", | |
| calendarId) | |
| # calendar.events.list | |
| pars = list(alwaysIncludeEmail = alwaysIncludeEmail, iCalUID = iCalUID, maxAttendees = maxAttendees, | |
| maxResults = maxResults, orderBy = orderBy, pageToken = pageToken, privateExtendedProperty = privateExtendedProperty, | |
| q = q, sharedExtendedProperty = sharedExtendedProperty, showDeleted = showDeleted, | |
| showHiddenInvitations = showHiddenInvitations, singleEvents = singleEvents, | |
| syncToken = syncToken, timeMax = timeMax, timeMin = timeMin, timeZone = timeZone, | |
| updatedMin = updatedMin) | |
| f <- googleAuthR::gar_api_generator(url, "GET", pars_args = rmNullObs(pars), | |
| data_parse_function = function(x) x) | |
| f() | |
| } | |
| #' Moves an event to another calendar, i.e. changes an event's organizer. | |
| #' | |
| #' Autogenerated via \code{\link[googleAuthR]{gar_create_api_skeleton}} | |
| #' | |
| #' @seealso \href{https://developers.google.com/google-apps/calendar/firstapp}{Google Documentation} | |
| #' | |
| #' @details | |
| #' Authentication scopes used by this function are: | |
| #' \itemize{ | |
| #' \item https://www.googleapis.com/auth/calendar | |
| #' } | |
| #' | |
| #' Set \code{options(googleAuthR.scopes.selected = c(https://www.googleapis.com/auth/calendar)} | |
| #' Then run \code{googleAuthR::gar_auth()} to authenticate. | |
| #' See \code{\link[googleAuthR]{gar_auth}} for details. | |
| #' | |
| #' @param calendarId Calendar identifier of the source calendar where the event currently is on | |
| #' @param eventId Event identifier | |
| #' @param destination Calendar identifier of the target calendar where the event is to be moved to | |
| #' @param sendNotifications Whether to send notifications about the change of the event's organizer | |
| #' @importFrom googleAuthR gar_api_generator | |
| #' @export | |
| events.move <- function(calendarId, eventId, destination, sendNotifications = NULL) { | |
| url <- sprintf("https://www.googleapis.com/calendar/v3/calendars/%s/events/%s/move", | |
| calendarId, eventId) | |
| # calendar.events.move | |
| pars = list(destination = destination, sendNotifications = sendNotifications) | |
| f <- googleAuthR::gar_api_generator(url, "POST", pars_args = rmNullObs(pars), | |
| data_parse_function = function(x) x) | |
| f() | |
| } | |
| #' Updates an event. This method supports patch semantics. | |
| #' | |
| #' Autogenerated via \code{\link[googleAuthR]{gar_create_api_skeleton}} | |
| #' | |
| #' @seealso \href{https://developers.google.com/google-apps/calendar/firstapp}{Google Documentation} | |
| #' | |
| #' @details | |
| #' Authentication scopes used by this function are: | |
| #' \itemize{ | |
| #' \item https://www.googleapis.com/auth/calendar | |
| #' } | |
| #' | |
| #' Set \code{options(googleAuthR.scopes.selected = c(https://www.googleapis.com/auth/calendar)} | |
| #' Then run \code{googleAuthR::gar_auth()} to authenticate. | |
| #' See \code{\link[googleAuthR]{gar_auth}} for details. | |
| #' | |
| #' @param Event The \link{Event} object to pass to this method | |
| #' @param calendarId Calendar identifier | |
| #' @param eventId Event identifier | |
| #' @param alwaysIncludeEmail Whether to always include a value in the email field for the organizer, creator and attendees, even if no real email is available (i | |
| #' @param maxAttendees The maximum number of attendees to include in the response | |
| #' @param sendNotifications Whether to send notifications about the event update (e | |
| #' @param supportsAttachments Whether API client performing operation supports event attachments | |
| #' @importFrom googleAuthR gar_api_generator | |
| #' @family Event functions | |
| #' @export | |
| events.patch <- function(Event, calendarId, eventId, alwaysIncludeEmail = NULL, maxAttendees = NULL, | |
| sendNotifications = NULL, supportsAttachments = NULL) { | |
| url <- sprintf("https://www.googleapis.com/calendar/v3/calendars/%s/events/%s", | |
| calendarId, eventId) | |
| # calendar.events.patch | |
| pars = list(alwaysIncludeEmail = alwaysIncludeEmail, maxAttendees = maxAttendees, | |
| sendNotifications = sendNotifications, supportsAttachments = supportsAttachments) | |
| f <- googleAuthR::gar_api_generator(url, "PATCH", pars_args = rmNullObs(pars), | |
| data_parse_function = function(x) x) | |
| stopifnot(inherits(Event, "gar_Event")) | |
| f(the_body = Event) | |
| } | |
| #' Creates an event based on a simple text string. | |
| #' | |
| #' Autogenerated via \code{\link[googleAuthR]{gar_create_api_skeleton}} | |
| #' | |
| #' @seealso \href{https://developers.google.com/google-apps/calendar/firstapp}{Google Documentation} | |
| #' | |
| #' @details | |
| #' Authentication scopes used by this function are: | |
| #' \itemize{ | |
| #' \item https://www.googleapis.com/auth/calendar | |
| #' } | |
| #' | |
| #' Set \code{options(googleAuthR.scopes.selected = c(https://www.googleapis.com/auth/calendar)} | |
| #' Then run \code{googleAuthR::gar_auth()} to authenticate. | |
| #' See \code{\link[googleAuthR]{gar_auth}} for details. | |
| #' | |
| #' @param calendarId Calendar identifier | |
| #' @param text The text describing the event to be created | |
| #' @param sendNotifications Whether to send notifications about the creation of the event | |
| #' @importFrom googleAuthR gar_api_generator | |
| #' @export | |
| events.quickAdd <- function(calendarId, text, sendNotifications = NULL) { | |
| url <- sprintf("https://www.googleapis.com/calendar/v3/calendars/%s/events/quickAdd", | |
| calendarId) | |
| # calendar.events.quickAdd | |
| pars = list(text = text, sendNotifications = sendNotifications) | |
| f <- googleAuthR::gar_api_generator(url, "POST", pars_args = rmNullObs(pars), | |
| data_parse_function = function(x) x) | |
| f() | |
| } | |
| #' Updates an event. | |
| #' | |
| #' Autogenerated via \code{\link[googleAuthR]{gar_create_api_skeleton}} | |
| #' | |
| #' @seealso \href{https://developers.google.com/google-apps/calendar/firstapp}{Google Documentation} | |
| #' | |
| #' @details | |
| #' Authentication scopes used by this function are: | |
| #' \itemize{ | |
| #' \item https://www.googleapis.com/auth/calendar | |
| #' } | |
| #' | |
| #' Set \code{options(googleAuthR.scopes.selected = c(https://www.googleapis.com/auth/calendar)} | |
| #' Then run \code{googleAuthR::gar_auth()} to authenticate. | |
| #' See \code{\link[googleAuthR]{gar_auth}} for details. | |
| #' | |
| #' @param Event The \link{Event} object to pass to this method | |
| #' @param calendarId Calendar identifier | |
| #' @param eventId Event identifier | |
| #' @param alwaysIncludeEmail Whether to always include a value in the email field for the organizer, creator and attendees, even if no real email is available (i | |
| #' @param maxAttendees The maximum number of attendees to include in the response | |
| #' @param sendNotifications Whether to send notifications about the event update (e | |
| #' @param supportsAttachments Whether API client performing operation supports event attachments | |
| #' @importFrom googleAuthR gar_api_generator | |
| #' @family Event functions | |
| #' @export | |
| events.update <- function(Event, calendarId, eventId, alwaysIncludeEmail = NULL, | |
| maxAttendees = NULL, sendNotifications = NULL, supportsAttachments = NULL) { | |
| url <- sprintf("https://www.googleapis.com/calendar/v3/calendars/%s/events/%s", | |
| calendarId, eventId) | |
| # calendar.events.update | |
| pars = list(alwaysIncludeEmail = alwaysIncludeEmail, maxAttendees = maxAttendees, | |
| sendNotifications = sendNotifications, supportsAttachments = supportsAttachments) | |
| f <- googleAuthR::gar_api_generator(url, "PUT", pars_args = rmNullObs(pars), | |
| data_parse_function = function(x) x) | |
| stopifnot(inherits(Event, "gar_Event")) | |
| f(the_body = Event) | |
| } | |
| #' Watch for changes to Events resources. | |
| #' | |
| #' Autogenerated via \code{\link[googleAuthR]{gar_create_api_skeleton}} | |
| #' | |
| #' @seealso \href{https://developers.google.com/google-apps/calendar/firstapp}{Google Documentation} | |
| #' | |
| #' @details | |
| #' Authentication scopes used by this function are: | |
| #' \itemize{ | |
| #' \item https://www.googleapis.com/auth/calendar | |
| #' \item https://www.googleapis.com/auth/calendar.readonly | |
| #' } | |
| #' | |
| #' Set \code{options(googleAuthR.scopes.selected = c(https://www.googleapis.com/auth/calendar, https://www.googleapis.com/auth/calendar.readonly)} | |
| #' Then run \code{googleAuthR::gar_auth()} to authenticate. | |
| #' See \code{\link[googleAuthR]{gar_auth}} for details. | |
| #' | |
| #' @param Channel The \link{Channel} object to pass to this method | |
| #' @param calendarId Calendar identifier | |
| #' @param alwaysIncludeEmail Whether to always include a value in the email field for the organizer, creator and attendees, even if no real email is available (i | |
| #' @param iCalUID Specifies event ID in the iCalendar format to be included in the response | |
| #' @param maxAttendees The maximum number of attendees to include in the response | |
| #' @param maxResults Maximum number of events returned on one result page | |
| #' @param orderBy The order of the events returned in the result | |
| #' @param pageToken Token specifying which result page to return | |
| #' @param privateExtendedProperty Extended properties constraint specified as propertyName=value | |
| #' @param q Free text search terms to find events that match these terms in any field, except for extended properties | |
| #' @param sharedExtendedProperty Extended properties constraint specified as propertyName=value | |
| #' @param showDeleted Whether to include deleted events (with status equals 'cancelled') in the result | |
| #' @param showHiddenInvitations Whether to include hidden invitations in the result | |
| #' @param singleEvents Whether to expand recurring events into instances and only return single one-off events and instances of recurring events, but not the underlying recurring events themselves | |
| #' @param syncToken Token obtained from the nextSyncToken field returned on the last page of results from the previous list request | |
| #' @param timeMax Upper bound (exclusive) for an event's start time to filter by | |
| #' @param timeMin Lower bound (inclusive) for an event's end time to filter by | |
| #' @param timeZone Time zone used in the response | |
| #' @param updatedMin Lower bound for an event's last modification time (as a RFC3339 timestamp) to filter by | |
| #' @importFrom googleAuthR gar_api_generator | |
| #' @family Channel functions | |
| #' @export | |
| events.watch <- function(Channel, calendarId, alwaysIncludeEmail = NULL, iCalUID = NULL, | |
| maxAttendees = NULL, maxResults = NULL, orderBy = NULL, pageToken = NULL, privateExtendedProperty = NULL, | |
| q = NULL, sharedExtendedProperty = NULL, showDeleted = NULL, showHiddenInvitations = NULL, | |
| singleEvents = NULL, syncToken = NULL, timeMax = NULL, timeMin = NULL, timeZone = NULL, | |
| updatedMin = NULL) { | |
| url <- sprintf("https://www.googleapis.com/calendar/v3/calendars/%s/events/watch", | |
| calendarId) | |
| # calendar.events.watch | |
| pars = list(alwaysIncludeEmail = alwaysIncludeEmail, iCalUID = iCalUID, maxAttendees = maxAttendees, | |
| maxResults = maxResults, orderBy = orderBy, pageToken = pageToken, privateExtendedProperty = privateExtendedProperty, | |
| q = q, sharedExtendedProperty = sharedExtendedProperty, showDeleted = showDeleted, | |
| showHiddenInvitations = showHiddenInvitations, singleEvents = singleEvents, | |
| syncToken = syncToken, timeMax = timeMax, timeMin = timeMin, timeZone = timeZone, | |
| updatedMin = updatedMin) | |
| f <- googleAuthR::gar_api_generator(url, "POST", pars_args = rmNullObs(pars), | |
| data_parse_function = function(x) x) | |
| stopifnot(inherits(Channel, "gar_Channel")) | |
| f(the_body = Channel) | |
| } | |
| #' Returns free/busy information for a set of calendars. | |
| #' | |
| #' Autogenerated via \code{\link[googleAuthR]{gar_create_api_skeleton}} | |
| #' | |
| #' @seealso \href{https://developers.google.com/google-apps/calendar/firstapp}{Google Documentation} | |
| #' | |
| #' @details | |
| #' Authentication scopes used by this function are: | |
| #' \itemize{ | |
| #' \item https://www.googleapis.com/auth/calendar | |
| #' \item https://www.googleapis.com/auth/calendar.readonly | |
| #' } | |
| #' | |
| #' Set \code{options(googleAuthR.scopes.selected = c(https://www.googleapis.com/auth/calendar, https://www.googleapis.com/auth/calendar.readonly)} | |
| #' Then run \code{googleAuthR::gar_auth()} to authenticate. | |
| #' See \code{\link[googleAuthR]{gar_auth}} for details. | |
| #' | |
| #' @param FreeBusyRequest The \link{FreeBusyRequest} object to pass to this method | |
| #' #' @importFrom googleAuthR gar_api_generator | |
| #' @family FreeBusyRequest functions | |
| #' @export | |
| freebusy.query <- function(FreeBusyRequest) { | |
| url <- "https://www.googleapis.com/calendar/v3/freeBusy" | |
| # calendar.freebusy.query | |
| f <- googleAuthR::gar_api_generator(url, "POST", data_parse_function = function(x) x) | |
| stopifnot(inherits(FreeBusyRequest, "gar_FreeBusyRequest")) | |
| f(the_body = FreeBusyRequest) | |
| } | |
| #' Returns a single user setting. | |
| #' | |
| #' Autogenerated via \code{\link[googleAuthR]{gar_create_api_skeleton}} | |
| #' | |
| #' @seealso \href{https://developers.google.com/google-apps/calendar/firstapp}{Google Documentation} | |
| #' | |
| #' @details | |
| #' Authentication scopes used by this function are: | |
| #' \itemize{ | |
| #' \item https://www.googleapis.com/auth/calendar | |
| #' \item https://www.googleapis.com/auth/calendar.readonly | |
| #' } | |
| #' | |
| #' Set \code{options(googleAuthR.scopes.selected = c(https://www.googleapis.com/auth/calendar, https://www.googleapis.com/auth/calendar.readonly)} | |
| #' Then run \code{googleAuthR::gar_auth()} to authenticate. | |
| #' See \code{\link[googleAuthR]{gar_auth}} for details. | |
| #' | |
| #' @param setting The id of the user setting | |
| #' @importFrom googleAuthR gar_api_generator | |
| #' @export | |
| settings.get <- function(setting) { | |
| url <- sprintf("https://www.googleapis.com/calendar/v3/users/me/settings/%s", | |
| setting) | |
| # calendar.settings.get | |
| f <- googleAuthR::gar_api_generator(url, "GET", data_parse_function = function(x) x) | |
| f() | |
| } | |
| #' Returns all user settings for the authenticated user. | |
| #' | |
| #' Autogenerated via \code{\link[googleAuthR]{gar_create_api_skeleton}} | |
| #' | |
| #' @seealso \href{https://developers.google.com/google-apps/calendar/firstapp}{Google Documentation} | |
| #' | |
| #' @details | |
| #' Authentication scopes used by this function are: | |
| #' \itemize{ | |
| #' \item https://www.googleapis.com/auth/calendar | |
| #' \item https://www.googleapis.com/auth/calendar.readonly | |
| #' } | |
| #' | |
| #' Set \code{options(googleAuthR.scopes.selected = c(https://www.googleapis.com/auth/calendar, https://www.googleapis.com/auth/calendar.readonly)} | |
| #' Then run \code{googleAuthR::gar_auth()} to authenticate. | |
| #' See \code{\link[googleAuthR]{gar_auth}} for details. | |
| #' | |
| #' @param maxResults Maximum number of entries returned on one result page | |
| #' @param pageToken Token specifying which result page to return | |
| #' @param syncToken Token obtained from the nextSyncToken field returned on the last page of results from the previous list request | |
| #' @importFrom googleAuthR gar_api_generator | |
| #' @export | |
| settings.list <- function(maxResults = NULL, pageToken = NULL, syncToken = NULL) { | |
| url <- "https://www.googleapis.com/calendar/v3/users/me/settings" | |
| # calendar.settings.list | |
| pars = list(maxResults = maxResults, pageToken = pageToken, syncToken = syncToken) | |
| f <- googleAuthR::gar_api_generator(url, "GET", pars_args = rmNullObs(pars), | |
| data_parse_function = function(x) x) | |
| f() | |
| } | |
| #' Watch for changes to Settings resources. | |
| #' | |
| #' Autogenerated via \code{\link[googleAuthR]{gar_create_api_skeleton}} | |
| #' | |
| #' @seealso \href{https://developers.google.com/google-apps/calendar/firstapp}{Google Documentation} | |
| #' | |
| #' @details | |
| #' Authentication scopes used by this function are: | |
| #' \itemize{ | |
| #' \item https://www.googleapis.com/auth/calendar | |
| #' \item https://www.googleapis.com/auth/calendar.readonly | |
| #' } | |
| #' | |
| #' Set \code{options(googleAuthR.scopes.selected = c(https://www.googleapis.com/auth/calendar, https://www.googleapis.com/auth/calendar.readonly)} | |
| #' Then run \code{googleAuthR::gar_auth()} to authenticate. | |
| #' See \code{\link[googleAuthR]{gar_auth}} for details. | |
| #' | |
| #' @param Channel The \link{Channel} object to pass to this method | |
| #' @param maxResults Maximum number of entries returned on one result page | |
| #' @param pageToken Token specifying which result page to return | |
| #' @param syncToken Token obtained from the nextSyncToken field returned on the last page of results from the previous list request | |
| #' @importFrom googleAuthR gar_api_generator | |
| #' @family Channel functions | |
| #' @export | |
| settings.watch <- function(Channel, maxResults = NULL, pageToken = NULL, syncToken = NULL) { | |
| url <- "https://www.googleapis.com/calendar/v3/users/me/settings/watch" | |
| # calendar.settings.watch | |
| pars = list(maxResults = maxResults, pageToken = pageToken, syncToken = syncToken) | |
| f <- googleAuthR::gar_api_generator(url, "POST", pars_args = rmNullObs(pars), | |
| data_parse_function = function(x) x) | |
| stopifnot(inherits(Channel, "gar_Channel")) | |
| f(the_body = Channel) | |
| } | |