# NOT RUN {
## Example with a prepared endpoint
ept <- googledrive::drive_endpoints("drive.files.update")[[1]]
req <- request_develop(
ept,
params = list(
fileId = "abc",
addParents = "123",
description = "Exciting File"
)
)
req
req <- request_build(
method = req$method,
path = req$path,
params = req$params,
body = req$body,
token = "PRETEND_I_AM_A_TOKEN"
)
req
## Example with no previous knowledge of the endpoint
## List a file's comments
## https://developers.google.com/drive/v3/reference/comments/list
req <- request_build(
method = "GET",
path = "drive/v3/files/{fileId}/comments",
params = list(
fileId = "your-file-id-goes-here",
fields = "*"
),
token = "PRETEND_I_AM_A_TOKEN"
)
req
# }
Run the code above in your browser using DataCamp Workspace