0
我正在显示谷歌驱动器根目录中的文件夹列表,并且我想在文件夹与其他人共享时显示图标,不管是谁和...分享。是否有可能获得文件请求中的权限列表
可以在file.list请求中获取该信息吗?或者我必须为每个文件夹提出一个新请求以获取权限列表?
在谷歌文档API有一个类别标签包含此信息。
Regards, Alvaro。
我正在显示谷歌驱动器根目录中的文件夹列表,并且我想在文件夹与其他人共享时显示图标,不管是谁和...分享。是否有可能获得文件请求中的权限列表
可以在file.list请求中获取该信息吗?或者我必须为每个文件夹提出一个新请求以获取权限列表?
在谷歌文档API有一个类别标签包含此信息。
Regards, Alvaro。
当使用请求的File.List,返回的响应体将包含下列:
{
"kind": "drive#fileList",
"etag": etag,
"selfLink": string,
"nextPageToken": string,
"nextLink": string,
"items": [files Resource]
}
然后,在[文件资源],该结构如下:
{
"kind": "drive#file",
"id": string,
"etag": etag,
"selfLink": string,
"webContentLink": string,
"alternateLink": string,
"embedLink": string,
"thumbnailLink": string,
"title": string,
"mimeType": string,
"description": string,
"labels": {
"starred": boolean,
"hidden": boolean,
"trashed": boolean,
"restricted": boolean,
"viewed": boolean
},
"createdDate": datetime,
"modifiedDate": datetime,
"modifiedByMeDate": datetime,
"lastViewedByMeDate": datetime,
"sharedWithMeDate": datetime,
"parents": [
parents Resource
],
"downloadUrl": string,
"exportLinks": {
(key): string
},
"indexableText": {
"text": string
},
"userPermission": permissions Resource,
"originalFilename": string,
"fileExtension": string,
"md5Checksum": string,
"fileSize": long,
"quotaBytesUsed": long,
"ownerNames": [
string
],
"lastModifyingUserName": string,
"editable": boolean,
"writersCanShare": boolean,
"explicitlyTrashed": boolean,
"imageMediaMetadata": {
"width": integer,
"height": integer,
"rotation": integer,
"location": {
"latitude": double,
"longitude": double,
"altitude": double
}
}
}
的字段“userPermission”是你可以找到你的答案。