Hello,

I'm not being able to make a calendar public :(
My code is the following:


       public void createCalendar(string calName)
       {
            CalendarEntry newCalend = new CalendarEntry();
            newCalend.Title.Text = calTitle;
            newCalend.Summary.Text = calName;
            newCalend.TimeZone = "Europe/Lisbon";
            newCalend.Hidden = false;
            newCalend.Selected = true;
            newCalend.Location = new Where("", "", "Portugal");
            // insert calendar
            Uri postUri = new Uri("http://www.google.com/calendar/
feeds/default/owncalendars/full");
            CalendarEntry createdCalendar = (CalendarEntry)getService
().Insert(postUri, newCalend);

            // make calendar public
            var aclEntry = new AclEntry();
            aclEntry.Scope = new AclScope();
            aclEntry.Scope.Type = AclScope.SCOPE_DEFAULT;
            aclEntry.Role = AclRole.ACL_CALENDAR_READ;
            aclEntry.Update();
            getService().Insert(getCalendarUri(createdCalendar),
aclEntry);
       }

        private static Uri getCalendarUri(CalendarEntry cal) {
            return new Uri("http://www.google.com/calendar/feeds/"; +
                            cal.EditUri.Content.Substring
(cal.EditUri.Content.IndexOf("full/") + 5) +
                            "/private/full");
        }



The calendar always remains private....
What am I doing wrong?
Thank you in advance.
Luís Soares



On Nov 4, 1:27 am, Trevor Johns <[EMAIL PROTECTED]> wrote:
> On 11/2/08, Matt Burton <[EMAIL PROTECTED]> wrote:
>
>
>
> >  Disregard - figured it out - I had AclRole.ACL_CALENDAR_ROOT instead
> >  of AclRole.ACL_CALENDAR_READ. Hitting tab completion too fast, I
> >  suppose...works like a charm now!
>
> >  Thanks,
> >  Matt
>
> Glad to hear you got it working.
>
> --
> Trevor Johns

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Calendar Data API" group.
To post to this group, send email to 
[email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-calendar-help-dataapi?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to