You may be able to improve the performance of your API calls by
requesting only the metadata that you actually need. This function is
primarily for internal use and is currently focused on the
Note that high-level googledrive functions assume that the
kind fields are included, at a bare minimum. Assuming that
resource = "files" (the default), input provided via
fields is checked
for validity against the known field names and the validated fields are
returned. To see a tibble containing all possible fields and a short
description of each, call
prep_fields() prepares fields for inclusion as query
drive_fields(fields = NULL, resource = "files") prep_fields(fields, resource = "files")
Character vector of field names. If
Character, naming the API resource of interest. Currently, only the Files resource is anticipated.
drive_fields(): Character vector of field names.
prep_fields(): a string.
Working with partial resources, in the Drive API documentation.
## get a tibble of all fields for the Files resource + indicator of defaults drive_fields(expose())#> [90m# A tibble: 51 x 2[39m #> name desc #> [3m[90m<chr>[39m[23m [3m[90m<chr>[39m[23m #> [90m 1[39m appProperties [90m"[39mA collection of arbitrary key-value pairs which are pri… #> [90m 2[39m capabilities Capabilities the current user has on this file. Each cap… #> [90m 3[39m contentHints Additional information about the content of the file. Th… #> [90m 4[39m createdTime The time at which the file was created (RFC 3339 date-ti… #> [90m 5[39m description A short description of the file. #> [90m 6[39m explicitlyTrashed Whether the file has been explicitly trashed, as opposed… #> [90m 7[39m fileExtension The final component of fullFileExtension. This is only a… #> [90m 8[39m folderColorRgb [90m"[39mThe color for a folder as an RGB hex string. The suppor… #> [90m 9[39m fullFileExtension [90m"[39mThe full file extension extracted from the name field. … #> [90m10[39m hasAugmentedPermi… Whether any users are granted file access directly on th… #> [90m# … with 41 more rows[39m## invalid fields are removed and throw warning drive_fields(c("name", "parents", "ownedByMe", "pancakes!"))#> Warning: Ignoring fields that are non-standard for the Files resource: #> * pancakes!#>  "name" "parents" "ownedByMe"## prepare fields for query prep_fields(c("name", "parents", "kind"))#>  "files/name,files/parents,files/kind"