ai didi

google-drive-api - 如何通过新的 google drive api 列出 "shared with me"项目?

转载 作者:行者123 更新时间:2023-12-04 18:47:17 24 4
gpt4 key购买 nike

当我通过网络查看时,“与我共享”文件夹中有四个文件:file1、file2、file3、fil4。我不拥有它们(我只能写/读)。我尝试使用带有参数的 file.list 方法获取它们
q = 'not (myId) in owner'。
之后的结果只包含四个file1中的一项。当我做
q = 'not (myId) in owner' and title = 'file2'
之后的结果只包含一个项目file2。有人能告诉我为什么吗?或者如何以其他方式列出它们?

更新。一段时间后"q = not 'me' in owner"返回空数组(。低于 "q = not 'me' in owners and title = 'File Name'" 的结果

{
"kind": "drive#fileList",
"etag": "\"dTUgP0s1WO8T7wOSfuvve0A4d_k/7dZrNXLata7h1mdbx2RHkqdePEM\"",
"selfLink": "https://www.googleapis.com/drive/v2/files?q=not+'me'+in+owners+and+title+%3D+'File+Name'",
"items": [
{

"kind": "drive#file",
"id": "1L8lfBYZHV59uUVpFspFdeW4SaJB7eo3CgPe59kpNCmY",
"etag": "\"dTUgP0s1WO8T7wOSfuvve0A4d_k/MTM0MjE4MDUzNjUyNg\"",
"selfLink": "https://www.googleapis.com/drive/v2/files/1L8lfBYZHV59uUVpFspFdeW4SaJB7eo3CgPe59kpNCmY",
"alternateLink": "https://docs.google.com/a/readdle.com/document/d/1L8lfBYZHV59uUVpFspFdeW4SaJB7eo3CgPe59kpNCmY/edit",
"embedLink": "https://docs.google.com/a/readdle.com/document/d/1L8lfBYZHV59uUVpFspFdeW4Sa5JB7eo3CgPe59kpNCmY/preview",
"thumbnailLink": "https://docs.google.com/feeds/vt?gd=true&id=1L8lfBYZHV59uUVpFspFdeW4SaJB7eo3CgPe59kpNCmY&v=270&s=AMedNnoAAAAAUE-eryR5NIqdEWR3A7bza730sDHhziBH&sz=s220",
"title": "File Name",
"mimeType": "application/vnd.google-apps.document",
"labels": {
"starred": false,
"hidden": false,
"trashed": false,
"restricted": false,
"viewed": true
},
"createdDate": "2012-03-19T08:37:26.636Z",
"modifiedDate": "2012-07-13T11:55:36.526Z",
"modifiedByMeDate": "2012-05-11T13:02:10.901Z",
"lastViewedByMeDate": "2012-09-04T14:44:32.193Z",
"sharedWithMeDate": "2012-05-11T10:15:44.221Z",
"parents": [
],
"exportLinks": {
"application/vnd.oasis.opendocument.text": "https://docs.google.com/feeds/download/documents/export/Export?id=1L8lfBYZHV59uUVpFspFdeW4SaJB7eo3CgPe59kpNCmY&exportFormat=odt",
"application/msword": "https://docs.google.com/feeds/download/documents/export/Export?id=1L8lfBYZHV59uUVpFspFdeW4SaJB7eo3CgPe59kpNCmY&exportFormat=doc",
"text/html": "https://docs.google.com/feeds/download/documents/export/Export?id=1L8lfBYZHV59uUVpFspFdeW4SaJB7eo3CgPe59kpNCmY&exportFormat=html",
"application/rtf": "https://docs.google.com/feeds/download/documents/export/Export?id=1L8lfBYZHV59uUVpFspFdeW4SaJB7eo3CgPe59kpNCmY&exportFormat=rtf",
"text/plain": "https://docs.google.com/feeds/download/documents/export/Export?id=1L8lfBYZHV59uUVpFspFdeW4SaJB7eo3CgPe59kpNCmY&exportFormat=txt",
"application/pdf": "https://docs.google.com/feeds/download/documents/export/Export?id=1L8lfBYZHV59uUVpFspFdeW4SaJB7eo3CgPe59kpNCmY&exportFormat=pdf"
},
"userPermission": {
"kind": "drive#permission",
"etag": "\"dTUgP0s1WO8T7wOSfuvve0A4d_k/b2rD7cIZxsGVuxg2MbXoc17PSQU\"",
"id": "me",
"selfLink": "https://www.googleapis.com/drive/v2/files/1L8lfBYZHV59uUVpFspFdeW4SaJB7eo3CgPe59kpNCmY/permissions/me",
"role": "writer",
"type": "user"
},
"quotaBytesUsed": "0",
"ownerNames": [
"Owner Name"
],
"lastModifyingUserName": "Owner Name",
"editable": true,
"writersCanShare": true
}
]
}

最佳答案

q=sharedWithMe 还应该返回所有与您共享的文件列表。

关于google-drive-api - 如何通过新的 google drive api 列出 "shared with me"项目?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12264370/

24 4 0
文章推荐: nlp - 过滤掉无意义的短语
文章推荐: cuda - driver.Context.synchronize()- 还有什么要考虑的——清理操作失败
文章推荐: magento - 运输方法在 magento 1.7 中不起作用
文章推荐: charts - Kendo UI 图表图例可以自动删除空系列吗?
行者123
个人简介

我是一名优秀的程序员,十分优秀!

滴滴打车优惠券免费领取
滴滴打车优惠券
全站热门文章
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com