logo       

Re: Accessing non-default Calendar: msg#00270

org.google.api.calendar

Subject: Re: Accessing non-default Calendar


Hi again,

Please forgive me if I seem out to lunch. Just a newb here.

I am using the Java Client Library.

I believe I am using ClientLogin:

userCalendarService = new CalendarService("mylartech-example-3");
userCalendarService.setUserCredentials(userEmail, password);


My initial Calendar URL is:

userUrl = new URL(CALENDAR_FEEDS_URL + userEmail + "/private/full");


Here is where the problem may lay, in how I locate the sought-after
custom Calendar's URL with the method header:

public boolean setCurrentCalendar(String calendarName) throws
IOException, ServiceException {


And then the iteration looking for a matching Calendar:

List<CalendarEntry> entries = calFeed.getEntries();
for (CalendarEntry entry : entries) {
if
(entry.getTitle().getPlainText().equalsIgnoreCase(calendarName))
{
userUrl = new
URL(entry.getSelfLink().getHref());
currentCalendarEntry =
userCalendarService.update(userUrl, entry);
}
}


If I use getEditLink(), I always get a NullPointerException. If I use
getLink("alternate", null) it does not work, either.

Any advice to set me on the right path would be humbly and happily
accepted. I have read most if not all of Google's offerings and not had
success in this endeavour; I'm a bit lost, obviously.

Thanks




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise