Hi,
I'm trying to create calendars using the batch mode.
This is my code.
URL postUrl = new
URL("https://www.google.com/calendar/feeds/default/owncalendars/full");
CalendarFeed feed = service.getFeed(postUrl, CalendarFeed.class);
CalendarFeed batchRequest = new CalendarFeed();
for (int id = 1; id <= 60; id++) {
CalendarEntry insertCalendar = new CalendarEntry();
insertCalendar.setTitle(new PlainTextConstruct("Test calendar
batch " + id));
insertCalendar.setSummary(new PlainTextConstruct("Este es el
calendario de pueba batch numero " + id));
BatchUtils.setBatchId(insertCalendar, id + "");
BatchUtils.setBatchOperationType(insertCalendar,
BatchOperationType.INSERT);
batchRequest.getEntries().add(insertCalendar);
}
Link batchLink = feed.getLink(Link.Rel.FEED_BATCH, Link.Type.ATOM);
CalendarFeed batchResponse = service. batch(new
URL(batchLink.getHref()), batchRequest);
But when a I try to use the batchLink it is null.
I search for batch URL for calendars, but i don't find it.
All the examples I find used batch to create events.
Is it possible to create calendars using batch method?
Thanks,
Martin
--
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://code.google.com/apis/calendar/community/forum.html