【问题标题】:Transferring ownership of a specific Google Doc file using google-api-ruby-client使用 google-api-ruby-client 转移特定 Google Doc 文件的所有权
【发布时间】:2014-02-07 21:20:39
【问题描述】:

我希望使用 Google Apps API 转移特定 Google 文档文件的所有权。一个 Google Apps 域上有许多帐户。我要传输的文件很多,所以我不想手动进行。

在 UI 中,我只看到了从特定用户而不是单个文件转移所有文件所有权的能力。

我浏览了 GitHub 页面以查找 google-api-ruby-client gem,但我无法提出解决方案。有人可以指出我正确的方向或发布示例吗?

【问题讨论】:

    标签: ruby google-docs google-apps google-api-ruby-client


    【解决方案1】:

    您需要使用 Google Drive API。特别是权限“更新”方法。 首先使用 Files.List 方法查找/获取文件 ID,这将允许您使用查询进行搜索。然后使用 Permissions.Update(或 Patch)方法,确保将 transferOwnership 参数设置为 True。

    完整文档在这里:Google Drive API - Permissions

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2022-01-04
      • 2022-06-15
      • 2017-08-04
      • 2011-11-21
      • 1970-01-01
      • 2016-11-01
      • 1970-01-01
      • 2015-11-27
      相关资源
      最近更新 更多