控制云端硬盘中共享文件夹的活动
我想控制 Google 云端硬盘中共享文件夹的活动。
我正在使用 Google Drive Activity API 来查看文件的实时信息,但遇到了两个问题:
我只能看到文件夹中我所做的修改,而看不到其他人所做的修改。 (我想有一些关于 2AuthClient 令牌的信息)
我无法知道文件是否被重命名(目前这并不重要)
我在想也许解决方案是要求每个有权访问该文件夹的帐户创建 Auth2Client 令牌并发给我。之后,为每个发送令牌的人运行一个函数,我看到的问题是共享个人和私有令牌的简单行为,但使用内部相同的代码执行多个函数的事实不是很合乎逻辑。
有没有人遇到过同样的问题并找到解决方案?
我的代码来自 Developers Google 平台:此处
即使在它应该获取 ActorInfo 的代码,它只将我作为演员,因为它只看到我的修改,而不是其他修改。
或者,即使有人知道实现此任务的另一种方法(也许没有谷歌驱动器活动 API),这也会非常有帮助。提前致谢!
I would like to control the activity of a shared folder that I have in Google Drive.
I am using the Google Drive Activity API to see the real-time information of the files but I came across two problems:
I can only see the modifications in the folder made by me and not by the others. (I suppose there's something about the 2AuthClient token)
I can't get to know if a file was renamed or not (which is not that important at the moment)
I was thinking that maybe a solution would be to ask that each account that has access to the folder to create an Auth2Client token and send it to me. After that run a function for each person who sends their token, the problem I see with that is the simple act of sharing a token which is personal and private but also the fact of doing multiple functions with the same code inside is not very logical.
Has anyone faced the same problem and found a solution?
My code is from the Developpers Google platform: here
And even if in the code it's supposed to get the ActorInfo, it only gives me as the actor because it only sees my modifications and not the other modifications.
Or even if someone knows another way to achieve this task (maybe without google drive activity API) it will be very helpfull. Thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
要向确定的资源显示活动,您必须添加以下参数之一作为联合字段
key
:itemName
或ancestorName
。如果未指定密钥,则默认值为ancestorName : items/root
如 文档:
items/ITEM_ID
。items/ITEM_ID
。在您的情况下,当您想要查询确定的共享文件夹时,您应该将其添加到请求正文中:
文档:
To show the activities to determined resources you have to add one of the following parameters as a union field
key
:itemName
orancestorName
. The default isancestorName : items/root
if no key is specifiedAs stated in the documentation:
items/ITEM_ID
.items/ITEM_ID
.In your case, as you want to query for a determined shared folder, you should add this inside the Request Body:
Documentation: