#' Deletes a group.
#'
#' Autogenerated via \code{\link[googlePackageMaker]{package_make}}.
#'
#' @seealso \href{https://developers.google.com/admin-sdk/}{Google Documentation}
#'
#' @details
#' Authentication scopes used by this function are:
#' \itemize{
#' \item https://www.googleapis.com/auth/admin.directory.group
#' }
#' @param groupKey Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.
#' @param callback JSONP
#' @param fields Selector specifying which fields to include in a partial response.
#' @param uploadType Legacy upload protocol for media (e.g. "media", "multipart").
#' @param upload_protocol Upload protocol for media (e.g. "raw", "multipart").
#' @param prettyPrint Returns response with indentations and line breaks.
#' @param quotaUser Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
#' @param alt Data format for 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_request Whether to return the request without making it. Defaults to FALSE. See \code{\link[gargle]{request_build}} for more info on the returned request object.
#' @param return_response Whether to return the response or the response content. Defaults to FALSE (return response content).
#' @export
groups.delete <- function(groupKey, callback = NULL, fields = NULL, uploadType = NULL, upload_protocol = NULL, prettyPrint = NULL, quotaUser = NULL, alt = NULL, gargle_token = gargle::token_fetch(scopes = .endpoints[['directory.groups.delete']]$scopes[[1]]), return_request = F, return_response = F){
params <- as.list(environment())[!names(as.list(environment())) %in% c('return_request', 'return_response', 'gargle_token')]
req <- gargle::request_develop(endpoint = .endpoints[['directory.groups.delete']], params = params, base_url = 'https://admin.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)
if(return_request) return(req)
res <- gargle::request_make(req, encode = 'json')
if(return_response) return(res)
httr::content(res)
}
#' Retrieves a group's properties.
#'
#' Autogenerated via \code{\link[googlePackageMaker]{package_make}}.
#'
#' @seealso \href{https://developers.google.com/admin-sdk/}{Google Documentation}
#'
#' @details
#' Authentication scopes used by this function are:
#' \itemize{
#' \item https://www.googleapis.com/auth/admin.directory.group
#' \item https://www.googleapis.com/auth/admin.directory.group.readonly
#' }
#' @param groupKey Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.
#' @param callback JSONP
#' @param fields Selector specifying which fields to include in a partial response.
#' @param uploadType Legacy upload protocol for media (e.g. "media", "multipart").
#' @param upload_protocol Upload protocol for media (e.g. "raw", "multipart").
#' @param prettyPrint Returns response with indentations and line breaks.
#' @param quotaUser Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
#' @param alt Data format for 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_request Whether to return the request without making it. Defaults to FALSE. See \code{\link[gargle]{request_build}} for more info on the returned request object.
#' @param return_response Whether to return the response or the response content. Defaults to FALSE (return response content).
#' @export
groups.get <- function(groupKey, callback = NULL, fields = NULL, uploadType = NULL, upload_protocol = NULL, prettyPrint = NULL, quotaUser = NULL, alt = NULL, gargle_token = gargle::token_fetch(scopes = .endpoints[['directory.groups.get']]$scopes[[1]]), return_request = F, return_response = F){
params <- as.list(environment())[!names(as.list(environment())) %in% c('return_request', 'return_response', 'gargle_token')]
req <- gargle::request_develop(endpoint = .endpoints[['directory.groups.get']], params = params, base_url = 'https://admin.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)
if(return_request) return(req)
res <- gargle::request_make(req, encode = 'json')
if(return_response) return(res)
httr::content(res)
}
#' Creates a group.
#'
#' Autogenerated via \code{\link[googlePackageMaker]{package_make}}.
#'
#' @seealso \href{https://developers.google.com/admin-sdk/}{Google Documentation}
#'
#' @details
#' Authentication scopes used by this function are:
#' \itemize{
#' \item https://www.googleapis.com/auth/admin.directory.group
#' }
#' @param description An extended description to help users determine the purpose of a group. For example, you can include information about who should join the group, the types of messages to send to the group, links to FAQs about the group, or related groups. Maximum length is `4,096` characters.
#' @param nonEditableAliases List of the group's non-editable alias email addresses that are outside of the account's primary domain or subdomains. These are functioning email addresses used by the group. This is a read-only property returned in the API's response for a group. If edited in a group's POST or PUT request, the edit is ignored by the API service.
#' @param name The group's display name.
#' @param kind The type of the API resource. For Groups resources, the value is `admin#directory#group`.
#' @param aliases List of a group's alias email addresses.
#' @param directMembersCount The number of users that are direct members of the group. If a group is a member (child) of this group (the parent), members of the child group are not counted in the `directMembersCount` property of the parent group.
#' @param email The group's email address. If your account has multiple domains, select the appropriate domain for the email address. The `email` must be unique. This property is required when creating a group. Group email addresses are subject to the same character usage rules as usernames, see the [help center](https://support.google.com/a/answer/9193374) for details.
#' @param etag ETag of the resource.
#' @param adminCreated Value is `true` if this group was created by an administrator rather than a user.
#' @param id The unique ID of a group. A group `id` can be used as a group request URI's `groupKey`.
#' @param callback JSONP
#' @param fields Selector specifying which fields to include in a partial response.
#' @param uploadType Legacy upload protocol for media (e.g. "media", "multipart").
#' @param upload_protocol Upload protocol for media (e.g. "raw", "multipart").
#' @param prettyPrint Returns response with indentations and line breaks.
#' @param quotaUser Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
#' @param alt Data format for 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_request Whether to return the request without making it. Defaults to FALSE. See \code{\link[gargle]{request_build}} for more info on the returned request object.
#' @param return_response Whether to return the response or the response content. Defaults to FALSE (return response content).
#' @export
groups.insert <- function(description = NULL, nonEditableAliases = NULL, name = NULL, kind = NULL, aliases = NULL, directMembersCount = NULL, email = NULL, etag = NULL, adminCreated = NULL, id = NULL, callback = NULL, fields = NULL, uploadType = NULL, upload_protocol = NULL, prettyPrint = NULL, quotaUser = NULL, alt = NULL, gargle_token = gargle::token_fetch(scopes = .endpoints[['directory.groups.insert']]$scopes[[1]]), return_request = F, return_response = F){
params <- as.list(environment())[!names(as.list(environment())) %in% c('return_request', 'return_response', 'gargle_token')]
req <- gargle::request_develop(endpoint = .endpoints[['directory.groups.insert']], params = params, base_url = 'https://admin.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)
if(return_request) return(req)
res <- gargle::request_make(req, encode = 'json')
if(return_response) return(res)
httr::content(res)
}
#' Retrieves all groups of a domain or of a user given a userKey (paginated).
#'
#' Autogenerated via \code{\link[googlePackageMaker]{package_make}}.
#'
#' @seealso \href{https://developers.google.com/admin-sdk/}{Google Documentation}
#'
#' @details
#' Authentication scopes used by this function are:
#' \itemize{
#' \item https://www.googleapis.com/auth/admin.directory.group
#' \item https://www.googleapis.com/auth/admin.directory.group.readonly
#' }
#' @param orderBy Column to use for sorting results
#' @param domain The domain name. Use this field to get fields from only one domain. To return all domains for a customer account, use the `customer` query parameter instead.
#' @param userKey Email or immutable ID of the user if only those groups are to be listed, the given user is a member of. If it's an ID, it should match with the ID of the user object.
#' @param customer The unique ID for the customer's Google Workspace account. In case of a multi-domain account, to fetch all groups for a customer, fill this field instead of domain. As an account administrator, you can also use the `my_customer` alias to represent your account's `customerId`. The `customerId` is also returned as part of the [Users](/admin-sdk/directory/v1/reference/users)
#' @param maxResults Maximum number of results to return. Max allowed value is 200.
#' @param query Query string search. Should be of the form "". Complete documentation is at https: //developers.google.com/admin-sdk/directory/v1/guides/search-groups
#' @param pageToken Token to specify next page in the list
#' @param sortOrder Whether to return results in ascending or descending order. Only of use when orderBy is also used
#' @param callback JSONP
#' @param fields Selector specifying which fields to include in a partial response.
#' @param uploadType Legacy upload protocol for media (e.g. "media", "multipart").
#' @param upload_protocol Upload protocol for media (e.g. "raw", "multipart").
#' @param prettyPrint Returns response with indentations and line breaks.
#' @param quotaUser Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
#' @param alt Data format for 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_request Whether to return the request without making it. Defaults to FALSE. See \code{\link[gargle]{request_build}} for more info on the returned request object.
#' @param return_response Whether to return the response or the response content. Defaults to FALSE (return response content).
#' @export
groups.list <- function(orderBy = NULL, domain = NULL, userKey = NULL, customer = NULL, maxResults = NULL, query = NULL, pageToken = NULL, sortOrder = NULL, callback = NULL, fields = NULL, uploadType = NULL, upload_protocol = NULL, prettyPrint = NULL, quotaUser = NULL, alt = NULL, gargle_token = gargle::token_fetch(scopes = .endpoints[['directory.groups.list']]$scopes[[1]]), return_request = F, return_response = F){
params <- as.list(environment())[!names(as.list(environment())) %in% c('return_request', 'return_response', 'gargle_token')]
req <- gargle::request_develop(endpoint = .endpoints[['directory.groups.list']], params = params, base_url = 'https://admin.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)
if(return_request) return(req)
res <- gargle::request_make(req, encode = 'json')
if(return_response) return(res)
httr::content(res)
}
#' Updates a group's properties.
#'
#' This method supports [patch semantics](/admin-sdk/directory/v1/guides/performance#patch). Autogenerated via \code{\link[googlePackageMaker]{package_make}}.
#'
#' @seealso \href{https://developers.google.com/admin-sdk/}{Google Documentation}
#'
#' @details
#' Authentication scopes used by this function are:
#' \itemize{
#' \item https://www.googleapis.com/auth/admin.directory.group
#' }
#' @param groupKey Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.
#' @param description An extended description to help users determine the purpose of a group. For example, you can include information about who should join the group, the types of messages to send to the group, links to FAQs about the group, or related groups. Maximum length is `4,096` characters.
#' @param nonEditableAliases List of the group's non-editable alias email addresses that are outside of the account's primary domain or subdomains. These are functioning email addresses used by the group. This is a read-only property returned in the API's response for a group. If edited in a group's POST or PUT request, the edit is ignored by the API service.
#' @param name The group's display name.
#' @param kind The type of the API resource. For Groups resources, the value is `admin#directory#group`.
#' @param aliases List of a group's alias email addresses.
#' @param directMembersCount The number of users that are direct members of the group. If a group is a member (child) of this group (the parent), members of the child group are not counted in the `directMembersCount` property of the parent group.
#' @param email The group's email address. If your account has multiple domains, select the appropriate domain for the email address. The `email` must be unique. This property is required when creating a group. Group email addresses are subject to the same character usage rules as usernames, see the [help center](https://support.google.com/a/answer/9193374) for details.
#' @param etag ETag of the resource.
#' @param adminCreated Value is `true` if this group was created by an administrator rather than a user.
#' @param id The unique ID of a group. A group `id` can be used as a group request URI's `groupKey`.
#' @param callback JSONP
#' @param fields Selector specifying which fields to include in a partial response.
#' @param uploadType Legacy upload protocol for media (e.g. "media", "multipart").
#' @param upload_protocol Upload protocol for media (e.g. "raw", "multipart").
#' @param prettyPrint Returns response with indentations and line breaks.
#' @param quotaUser Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
#' @param alt Data format for 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_request Whether to return the request without making it. Defaults to FALSE. See \code{\link[gargle]{request_build}} for more info on the returned request object.
#' @param return_response Whether to return the response or the response content. Defaults to FALSE (return response content).
#' @export
groups.patch <- function(groupKey, description = NULL, nonEditableAliases = NULL, name = NULL, kind = NULL, aliases = NULL, directMembersCount = NULL, email = NULL, etag = NULL, adminCreated = NULL, id = NULL, callback = NULL, fields = NULL, uploadType = NULL, upload_protocol = NULL, prettyPrint = NULL, quotaUser = NULL, alt = NULL, gargle_token = gargle::token_fetch(scopes = .endpoints[['directory.groups.patch']]$scopes[[1]]), return_request = F, return_response = F){
params <- as.list(environment())[!names(as.list(environment())) %in% c('return_request', 'return_response', 'gargle_token')]
req <- gargle::request_develop(endpoint = .endpoints[['directory.groups.patch']], params = params, base_url = 'https://admin.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)
if(return_request) return(req)
res <- gargle::request_make(req, encode = 'json')
if(return_response) return(res)
httr::content(res)
}
#' Updates a group's properties.
#'
#' Autogenerated via \code{\link[googlePackageMaker]{package_make}}.
#'
#' @seealso \href{https://developers.google.com/admin-sdk/}{Google Documentation}
#'
#' @details
#' Authentication scopes used by this function are:
#' \itemize{
#' \item https://www.googleapis.com/auth/admin.directory.group
#' }
#' @param groupKey Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.
#' @param description An extended description to help users determine the purpose of a group. For example, you can include information about who should join the group, the types of messages to send to the group, links to FAQs about the group, or related groups. Maximum length is `4,096` characters.
#' @param nonEditableAliases List of the group's non-editable alias email addresses that are outside of the account's primary domain or subdomains. These are functioning email addresses used by the group. This is a read-only property returned in the API's response for a group. If edited in a group's POST or PUT request, the edit is ignored by the API service.
#' @param name The group's display name.
#' @param kind The type of the API resource. For Groups resources, the value is `admin#directory#group`.
#' @param aliases List of a group's alias email addresses.
#' @param directMembersCount The number of users that are direct members of the group. If a group is a member (child) of this group (the parent), members of the child group are not counted in the `directMembersCount` property of the parent group.
#' @param email The group's email address. If your account has multiple domains, select the appropriate domain for the email address. The `email` must be unique. This property is required when creating a group. Group email addresses are subject to the same character usage rules as usernames, see the [help center](https://support.google.com/a/answer/9193374) for details.
#' @param etag ETag of the resource.
#' @param adminCreated Value is `true` if this group was created by an administrator rather than a user.
#' @param id The unique ID of a group. A group `id` can be used as a group request URI's `groupKey`.
#' @param callback JSONP
#' @param fields Selector specifying which fields to include in a partial response.
#' @param uploadType Legacy upload protocol for media (e.g. "media", "multipart").
#' @param upload_protocol Upload protocol for media (e.g. "raw", "multipart").
#' @param prettyPrint Returns response with indentations and line breaks.
#' @param quotaUser Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
#' @param alt Data format for 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_request Whether to return the request without making it. Defaults to FALSE. See \code{\link[gargle]{request_build}} for more info on the returned request object.
#' @param return_response Whether to return the response or the response content. Defaults to FALSE (return response content).
#' @export
groups.update <- function(groupKey, description = NULL, nonEditableAliases = NULL, name = NULL, kind = NULL, aliases = NULL, directMembersCount = NULL, email = NULL, etag = NULL, adminCreated = NULL, id = NULL, callback = NULL, fields = NULL, uploadType = NULL, upload_protocol = NULL, prettyPrint = NULL, quotaUser = NULL, alt = NULL, gargle_token = gargle::token_fetch(scopes = .endpoints[['directory.groups.update']]$scopes[[1]]), return_request = F, return_response = F){
params <- as.list(environment())[!names(as.list(environment())) %in% c('return_request', 'return_response', 'gargle_token')]
req <- gargle::request_develop(endpoint = .endpoints[['directory.groups.update']], params = params, base_url = 'https://admin.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)
if(return_request) return(req)
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.