# NOT RUN {
req <- generate_request(
"drive.files.get",
list(fileId = "abc"),
token = drive_token()
)
req
# }
# NOT RUN {
## re-create the previous request, but the hard way, i.e. "by hand"
req <- build_request(
path = "drive/v3/files/{fileId}",
method = "GET",
list(fileId = "abc", key = "an-api-key"),
token = NULL
)
req
## call an endpoint not used by googledrive
## List a file's comments
## https://developers.google.com/drive/v3/reference/comments/list
# }
# NOT RUN {
req <- build_request(
path = "drive/v3/files/{fileId}/comments",
method = "GET",
params = list(
fileId = "your-file-id-goes-here",
fields = "*"
),
token = drive_token()
)
process_response(make_request(req))
# }
Run the code above in your browser using DataLab