Oh Hallelujah, I finally found the answer.

The secret to posting in Java to calendars other than the main one
is changing the URL, and knowing just HOW to change the URL.

Instead of:

URL postUrl =
  new URL("http://www.google.com/calendar/feeds/[EMAIL PROTECTED]/private/
full");

you go into the "Calendar Settings" for the alternate calendar, and
get the
URL that is given by the XML button next to "Private Address".

But that isn't enough.. you have to know this secret:
Change the last part of it from

    /private-@@@@@@@@@@@@@@@/basic

to:

   /private/full

where @@@@@@@@@ is some long hexadecimal number.

Thanks to "mrchucho" from a thread titled "Access Additional
Calendars" where I finally found this trick.

Regards,
Phill


On Aug 8, 12:40 am, ptconrad <[EMAIL PROTECTED]> wrote:
> Dear Fellow Google Calendar API _Java_ programmers:
>
> Almost a year ago, I posted a query about some example code in _Java_
> for creating events on a calendar other than the default
> calendar.
>
> At the time, no-one could give me a clear answer about how to do it----
> the answers I got were in terms of the underlying XML data structures,
> but I have no desire to get that down and dirty---I just want to make
> Java API method calls.   Really, some sample code is what I'm looking
> for, and so far, I still can't find any.
>
> For example, one person suggested this:
>
>   "You should be using the feed's "post" URL to post.  Do an
> authenticated
>   GET of a read/write feed type (for more info about feed types, see
>  "Calendar feed types" in the Calendar/GData doc), then look for a
> <link
>   rel="http://schemas.google.com/g/2005#post";> element in the feed.
> That
>   element will tell you the URL to send a POST request to.  The POST
>   request has to be authenticated too, of course."
>
> Fine.   But I can't find any clear instruction in the javadoc, or the
> Java API description of how to do any such thing.
>
> So, its now a year later.  I have a dandy little Java program that
> will put events on my main calendar--but that isn't where I want the
> events.   What I have is a database of all the events on the Academic
> Calendar of my university, and I want to put them on a "secondary"
> calendar that others can subscribe to.
>
> I've read, and re-read, and re-re-read the documentation, and searched
> this group in vain.  Can anyone help with some sample code?
>
> Regards,
> Phill Conradhttp://copland.udel.edu/~pconrad


--~--~---------~--~----~------------~-------~--~----~
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