简体   繁体   中英

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. This library uses version 2 of the protocol, which does not support changing the ownership of a document.

Has anyone managed to find a successful workaround which lets them change the owner of a document using the version 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.

Alternatively, has anyone got any advice on how to use version 3 of the API from Python? The gdata library won't work - perhaps there is a more manual way of accessing the 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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM