简体   繁体   English

Google Docs API和Python:如何更改文档的所有者?

[英]Google Docs API and Python: How to change the owner of a document?

I am using the gdata-python library to perform a number of operations via the Google Docs API. 我正在使用gdata-python库通过Google Docs API执行许多操作。 This library uses version 2 of the protocol, which does not support changing the ownership of a document. 该库使用协议的版本2,该版本不支持更改文档的所有权。

Has anyone managed to find a successful workaround which lets them change the owner of a document using the version 2 API? 是否有人设法找到一种成功的解决方法,使他们可以使用版本2 API更改文档的所有者?

One idea I thought of was to 'make a copy' of the document in to the new account, which would duplicate the ACL as well. 我想到的一个想法是将文档“复制”到新帐户中,这也将复制ACL。

Alternatively, has anyone got any advice on how to use version 3 of the API from Python? 另外,是否有人从Python获得关于如何使用API​​版本3的建议? The gdata library won't work - perhaps there is a more manual way of accessing the API? gdata库无法正常工作-也许还有一种更手动的方式访问API?

I'm not sure if it is good form to answer my own question, or just add a comment. 我不确定是回答我自己的问题还是添加评论的好形式。

It turns out that a little bit more RTFM'ing was required - http://code.google.com/intl/nl-NL/apis/documents/docs/3.0/developers_guide_python.html#ACLRetrieve 事实证明,还需要进行更多RTFM处理-http: //code.google.com/intl/nl-NL/apis/documents/docs/3.0/developers_guide_python.html#ACLRetrieve

This document is incompatible with version 2 of the API - it turns out I was trying to use a mixture of calls, which obviously didn't work. 该文档与API版本2不兼容-事实证明,我试图使用混合调用,但显然不起作用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在 Python 中使用 Google Drive API v3 更改所有者? - How to change the owner with Google Drive API v3 in Python? 谷歌文档 API 和 Python - Google Docs API with Python 如何使用 Google API 检索 Google Docs 文档的内容 - How to retrieve contents of a Google Docs Document using the Google API 使用谷歌文档 API 和 python 在键值对中添加数据时如何改善文档中的间距 - How to improve spacing in a document when adding data in key value pair using google docs API and python 使用Google App Engine如何在谷歌文档中上传文档(python) - Using Google App Engine how to upload document in google docs (python) 如何使用 python 将文本附加到 Google Docs 文档的末尾? - How to append text to the end of a Google Docs Document using python? 如何使用google docs api更新google doc(Python) - How to update google doc using google docs api (Python) 通过 Google 文档 API Python 客户端库创建新的 Google 文档的命令是什么? - What are the commands for creating a new Google Document via the Google Docs API Python Client Library? 将html文档上传到python中的Google文档 - Upload an html document to Google Docs in python 如何使用谷歌文档 API 和 Python 将本地图像添加到谷歌文档? - How to add local image to google docs using Google docs API and Python?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM