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 v
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):
RevisionQuery revisionQuery = new RevisionQuery(entry.RevisionDocument);
RevisionFeed revisions = service.Query(revisionQuery);
// TODO: choose the revision you want to publish, this sample selects the first one
RevisionEntry revision = (RevisionEntry)revisions.Entries[0];
revision.Publish = true;
revision.PublishAuto = true;
revision.Update();
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:
AclEntry aclEntry = new AclEntry();
aclEntry.Role = new AclRole("reader");
aclEntry.Scope = new AclScope(AclScope.SCOPE_DEFAULT);
// documentEntry is the document that you want to publish and service is an
// authorized DocumentsService object.
AclEntry insertedEntry = service.Insert(
new Uri(documentEntry.AccessControlList), aclEntry);