Hi Eric, Below is the code I tried, and the error message I got back. Fails on line insertedEntry = service.Insert(feedUri, aclentry) as AclEntry;
Chris // first, get entry to be updated DocumentsListQuery query = new DocumentsListQuery(); query.NumberToRetrieve = 1; query.Title = title; query.TitleExact = true; DocumentsFeed feed = service.Query(query); DocumentEntry entry = null; AclEntry insertedEntry = null; if (feed.Entries.Count > 0) entry = feed.Entries[0] as DocumentEntry; // next, if successful, then update the document if (entry != null) { AclEntry aclentry = new AclEntry(); aclentry.Scope = new AclScope(); aclentry.Scope.Type = AclScope.SCOPE_USER; aclentry.Scope.Value = "everyone"; aclentry.Role = AclRole.ACL_CALENDAR_READ; //aclentry.Role = "read"; Uri feedUri = new Uri(entry.SelfUri.ToString()); insertedEntry = service.Insert(feedUri, aclentry) as AclEntry; } Google.GData.Client.GDataRequestException was unhandled by user code Message="Execution of request failed: http://docs.google.com/feeds/documents/private/full/spreadsheet:twltQwSOUVNotUWtnUafTyQ" Source="Google.GData.Client" ResponseString="Invalid request URI" StackTrace: at Google.GData.Client.GDataRequest.Execute() at Google.GData.Client.GDataGAuthRequest.Execute(Int32 retryCounter) at Google.GData.Client.GDataGAuthRequest.Execute() at Google.GData.Client.Service.EntrySend(Uri feedUri, AtomBase baseEntry, GDataRequestType type, AsyncSendData data) at Google.GData.Client.Service.Insert(Uri feedUri, AtomEntry newEntry, AsyncSendData data) at Google.GData.Client.Service.Insert[TEntry](Uri feedUri, TEntry entry) at SetAcl.mGDataSetAcl(String title) in f: \ActiveInterfaceBusiness\client-folders\pittsburghtoday.org\web \SetAcl.aspx.cs:line 142 at SetAcl.HandleButton(Object sender, EventArgs e) in f: \ActiveInterfaceBusiness\client-folders\pittsburghtoday.org\web \SetAcl.aspx.cs:line 72 at System.Web.UI.WebControls.Button.OnClick(EventArgs e) at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent (String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) On Jul 23, 6:41 pm, Eric Bidelman <api.e...@google.com> wrote: > Calendar's .NET examples may > help:http://code.google.com/apis/calendar/docs/2.0/developers_guide_dotnet... > > And reference the DocList > docs:http://code.google.com/apis/documents/docs/2.0/developers_guide_proto... > <http://code.google.com/apis/calendar/docs/2.0/developers_guide_dotnet...> > Eric > > On Thu, Jul 23, 2009 at 3:31 PM, chrissky <back5...@gmail.com> wrote: > > > This is a repost: > > > Can this now be done. Previous discussion on this was ambiguous. Any > > code samples in C# for this? Eric? Please. I need to automate this. > > > Thanks!, > > Chris --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Docs Data APIs" group. To post to this group, send email to Google-Docs-Data-APIs@googlegroups.com To unsubscribe from this group, send email to google-docs-data-apis+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Docs-Data-APIs?hl=en -~----------~----~----~----~------~----~------~--~---