How to publish Google Docs in .NET?

后端 未结 2 1730
孤独总比滥情好
孤独总比滥情好 2021-01-06 10:04

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

2条回答
  •  不知归路
    2021-01-06 10:54

    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);
    

提交回复
热议问题