file_metadata: Retrieve the metadata for a specific file.

Description Usage Arguments See Also Examples

View source: R/files.R

Description

file_metadata retrieves the metadata for a specific file the user has access to. To retrieve the metadata for all files, see list_files.

Usage

1
file_metadata(file_id, simplify = FALSE, ...)

Arguments

file_id

a file ID, as a string. This can be retrieved from the URL bar when you're accessing the file: for example, "https://docs.google.com/document/d/1gOxog56F2bCnxwum7VhmN3JqTX7usTYcK5X3V4QDnxg" has the file_id "1gOxog56F2bCnxwum7VhmN3JqTX7usTYcK5X3V4QDnxg". Alternately, you can pass in the full URL, and driver will do its best to extract the ID.

simplify

whether or not to perform some (small) simplification of the returned list, to make it less nested, headachey and impossible to read. Set to FALSE by default.

...

further arguments to pass to httr's GET.

See Also

list_files, for requesting the metadata associated with many files.

Examples

1
2
3
4
5
## Not run: 
#Once we've authenticated and grabbed a token, we can grab the metadata for the example file:
example_metadata <- file_metadata("1gOxog56F2bCnxwum7VhmN3JqTX7usTYcK5X3V4QDnxg")

## End(Not run)

noamross/driver documentation built on May 23, 2019, 9:30 p.m.