I'm using the google-gdata .NET library for integrating with Google Docs. It's working out pretty well, but I can't figure out how to use it to publish my documents for view-only link-based web access.
The basic idea behind this is to be able to upload a document to Google Docs, and be able to view that document in a web environment (outside of Google) without having to log in using a Google credential. As far as I can tell, the best way to do that would be publishing it via a secret link, as described in the help article linked above.
So does anyone know how to publish Google Docs programatically in .NET?
EDIT
As a point of reference, and as an illustration on the difference between changing the ACL on a document (i.e. making it public) and publishing the document per se (as the link above describes), these are the corresponding versions of the same document on Google Docs:
- ACL public read access | http://bit.ly/HYAXBc
- Published to the web | http://bit.ly/HN0rEn
Your question has already been answered on this post which contains a Java code snippet. For .NET, you should be able to do something like that:
I just updated the .NET client library, now you can use the following code to publish a revision (it assumes
entry
is the DocumentEntry instance you want to publish):