Google Drive SDK:以编程方式固定 Google 文档修订版

Google Drive SDK: Programatically pin a Google Doc revision

Google Drive API v2 Drive.revisions.update 方法允许设置固定参数,以便永远不会自动清除特定修订。然而,正如文档所说,这不适用于 Google Docs。我们如何固定一个修订版以使其永远不会被删除?我有一个应用程序依赖于在稍后的时间点跟踪和检索某些修订。

关于如何做到这一点有什么建议吗?

Google 文档(以及电子表格等所有原生 google 格式)不会自动删除任何修订,因此无需固定修订。

如果您指的是 .doc,则它们不是 Google 文档。

我在文档中找不到参考资料,但我确实在他们的营销页面中找到了官方参考资料: https://apps.google.com/intx/en/products/docs/ 说:

Unlimited revision history Track changes made to your documents and undo anything you choose. Previous versions are kept indefinitely and they don't count toward your storage.

看来Google也清楚这一点

pinned - This will only be populated and can only be modified on files with content stored in Drive which are not Google Docs.

尝试 converting 将您的修订文件转换为 pdf(非 Google Doc)。然后,您可以使用 pinned = true.

保留修订