File: drive_about.R

package info (click to toggle)
r-cran-googledrive 2.1.1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,584 kB
  • sloc: sh: 13; makefile: 2
file content (28 lines) | stat: -rw-r--r-- 947 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#' Get info on Drive capabilities
#'
#' Gets information about the user, the user's Drive, and system capabilities.
#' This function mostly exists to power [drive_user()], which extracts the most
#' useful information (the information on current user) and prints it nicely.
#'
#' @seealso Wraps the `about.get` endpoint:
#'   * <https://developers.google.com/drive/api/v3/reference/about/get>
#'
#' @return A list representation of a Drive
#'   [about resource](https://developers.google.com/drive/api/v3/reference/about)
#' @export
#'
#' @examplesIf drive_has_token()
#' drive_about()
#'
#' # explore the export formats available for Drive files, by MIME type
#' about <- drive_about()
#' about[["exportFormats"]] %>%
#'   purrr::map(unlist)
drive_about <- function() {
  request <- request_generate(
    endpoint = "drive.about.get",
    params = list(fields = "*")
  )
  response <- request_make(request)
  gargle::response_process(response)
}