Search code examples
pythongdata-apigoogle-sites

How do I update attachment content with the google sites python API?


I'm trying to write a script that will automatically update some attachments on a website created and managed through Google Sites. This should be possible as Google released the Sites API in September and the Python GData API claims to support sites. However, the closest method I can find is called client.update, which allows me to update the metadata of an attachment, but not the content.

In the Java API updating an attachment is done by creating a new MediaFileSource and then calling entry.setMediaFileSource(source) followed by entry.updateMedia(). However, I can't find anything similar in the Python API. Am I dumb and just missing something, or is it really not possible to update a google sites attachment using the python API?


Solution

  • sites api has been updated to v1.1; this is probably a new addition

    http://code.google.com/apis/sites/docs/1.0/developers_guide_python.html#UpdatingContent