CalendarClientpublic class CalendarClient extends com.google.wireless.gdata.client.GDataServiceClient GDataServiceClient for accessing Google Calendar. This client can access and
parse both the meta feed (list of calendars for a user) and events feeds
(calendar entries for a specific user). The parsers this class uses handle
the XML version of feeds. |
Fields Summary |
---|
public static final String | SERVICEService value for calendar. | public static final String | PROJECTION_PRIVATE_FULL | public static final String | PROJECTION_PRIVATE_SELF_ATTENDANCE | private static final String | CALENDAR_BASE_FEED_URLStandard base url for a calendar feed. |
Methods Summary |
---|
public java.lang.String | getDefaultCalendarUrl(java.lang.String username, java.lang.String projection, com.google.wireless.gdata.client.QueryParams params)Returns the url for the default feed for a user, after applying the
provided QueryParams.
String feedUrl = CALENDAR_BASE_FEED_URL + getGDataClient().encodeUri(username);
feedUrl += projection;
if (params == null) {
return feedUrl;
}
return params.generateQueryUrl(feedUrl);
| public com.google.wireless.gdata.parser.GDataParser | getParserForUserCalendars(java.lang.String feedUrl, java.lang.String authToken)Fetches the meta feed containing the list of calendars for a user. The
caller is responsible for closing the returned {@link GDataParser}.
GDataClient gDataClient = getGDataClient();
InputStream is = gDataClient.getFeedAsStream(feedUrl, authToken);
return getGDataParserFactory().createParser(CalendarEntry.class, is);
| public java.lang.String | getServiceName()
return SERVICE;
| public java.lang.String | getUserCalendarsUrl(java.lang.String username)Returns the url for the metafeed for user, which contains the information about
the user's calendars.
return CALENDAR_BASE_FEED_URL + getGDataClient().encodeUri(username);
|
|