Actually, I have an additional question. I want to know how to make
secondary calendars public. After much browsing of the discussion
group, I figured changing the above ACL_URL's /default/ portion to /
[EMAIL PROTECTED]/ would do the trick. Javascript now complains
"Authentication required."  Any ideas how to treat this?

On Mar 3, 4:38 pm, Terence Kim <[EMAIL PROTECTED]> wrote:
> Ah, makes perfect sense. Oh, and, if I may, a little feedback: I found
> the developer's guide for Javascript lacking in instructing developers
> how to make calendar's public.  These topics are explained in other
> client libraries but it would be cool if they were explained with
> Javascript as well.
>
> Thanks for the timely and helpful responses, Austin!
>
> On Mar 3, 3:34 pm, "Austin (Google)" <[EMAIL PROTECTED]> wrote:
>
> > The fix I gave you will always work =).
>
> > Just that the constant symbols google.gdata.AclRole.VALUE_READER and
> > VALUE_WRITER is outputing the wrong values.  So if you replace that with the
> > correct literal string, the one I gave you, it should always work.
>
> > Austin
>
> > On Mon, Mar 3, 2008 at 3:31 PM, Terence Kim <[EMAIL PROTECTED]> wrote:
>
> > > Haha, no problem.  Glad to do Google a service!  And thank you very
> > > much for the quickfix.  Do you know when the bug will be fixed or, in
> > > other words, when the quickfix will stop working?
>
> > > On Mar 3, 2:56 pm, "Austin (Google)" <[EMAIL PROTECTED]> wrote:
> > > > Hi Terence,
>
> > > > I found out this is a bug with the setValue for AcRole and I am going to
> > > > submit a fix for that.  For now you can do this to fix your problem -
>
> > > >     var ACL_URL = "
> > >http://www.google.com/calendar/feeds/default/acl/full/default";;
>
> > > >     var entry = new google.gdata.AclEntry();
> > > >     var role = new google.gdata.AclRole();
> > > >     //role.setValue(google.gdata.AclRole.VALUE_READER);
> > > >     
> > > > role.setValue('http://schemas.google.com/gCal/2005#read'<http://schemas.google.com/gCal/2005#read%27>
> > > );
> > > >     entry.setRole(role);
>
> > > >     var scope = new google.gdata.AclScope();
> > > >     scope.setType(google.gdata.AclScope.TYPE_DEFAULT);
> > > >     entry.setScope(scope);
>
> > > >     calendarService.updateEntry(ACL_URL, entry, function() {alert('ACL
> > > is
> > > > updated');}, handleError, google.gdata.AclEntry);
>
> > > > Thanks for helping us to discover this!
> > > > Austin
>
> > > > On Mon, Mar 3, 2008 at 11:37 AM, Austin (Google) <[EMAIL PROTECTED]>
> > > > wrote:
>
> > > > > Hi,
>
> > > > > This is strange, I get the similar result you do.  I will look into
> > > this
> > > > > and update you on this.
>
> > > > > Austin
>
> > > > > On Sat, Mar 1, 2008 at 11:55 PM, Terence Kim <[EMAIL PROTECTED]>
> > > wrote:
>
> > > > > > Update: Here's what I have now:
>
> > > > > > function setPublic() {
> > > > > >  calendarService.getAclFeed(EVENT_FEED_URL, publishCalendar,
> > > > > > handleError);
> > > > > > }
>
> > > > > > function publishCalendar(entryRoot) {
> > > > > >  var entry = new google.gdata.AclEntry();
> > > > > >   var ACL_URL = "
> > >http://www.google.com/calendar/feeds/default/acl/full/
> > > > > > default";
> > > > > >   var ar = new google.gdata.AclRole();
> > > > > >   ar.setValue(google.gdata.AclRole.VALUE_READER);
> > > > > >   entry.setRole(ar);
> > > > > >  var as = new google.gdata.AclScope();
> > > > > >   as.setType("default");
> > > > > >   entry.setScope(as);
> > > > > >  calendarService.updateEntry(ACL_URL, entry, handleTest,
> > > handleError,
> > > > > > Object);
> > > > > > }
>
> > > > > > Here's the message I get now:
> > > > > > Illegal value of gAcl:role passed: reader
>
> > > > > > On Mar 1, 11:27 pm, Terence Kim <[EMAIL PROTECTED]> wrote:
> > > > > > > Hello,
>
> > > > > > > I've read a lot of other threads regarding this issue (mostly
> > > > > > > addressed by Austin) and I feel like they're getting me closer and
> > > > > > > closer to the solution.  However, I am not held up in that there
> > > are
> > > > > > > no concrete examples of how to do this in Javascript.  Here's what
> > > I
> > > > > > > have so far:
>
> > > > > > > function setPublic() {
> > > > > > >   calendarService.getAclFeed(ACL_URL, publishCalendar,
> > > handleError);
>
> > > > > > > }
>
> > > > > > > function publishCalendar(entryRoot) {
> > > > > > >   var entry = new google.gdata.AclEntry();
>
> > > > > > >   var ar = new google.gdata.AclRole();
> > > > > > >   ar.setValue("read");
> > > > > > >   entry.setRole(ar);
>
> > > > > > >   var as = new google.gdata.AclScope();
> > > > > > >   as.setValue("default");
> > > > > > >   entry.setScope(as);
>
> > > > > > >   calendarService.updateEntry(ACL_URL, entry, handleTest,
> > > handleError,
> > > > > > > Object);
>
> > > > > > > }
>
> > > > > > > I get an error message saying:
> > > > > > > "Unknown visibility found:Acl"
>
> > > > > > > And what I have may not be close to the actual solution.  So in
> > > short,
> > > > > > > does anyone know how to set a calendar public using Javascript?
>
> > > > > > > Thanks in advance!
--~--~---------~--~----~------------~-------~--~----~
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