Hello Alain, thanks for your reply!

Ok I meant the  Event "self" link, now how can I use "String URL =
entry.getSelfLink().getHref();" with Google Calendar Apis? Could you please
write me some tips?

I'm using the following code:

    public EventDetail getEventDetail(String id) {
     EventDetail ret = new EventDetail();
     URL urlFeedGc = null;
     String userGc = "";
String passwordGc = "";
     try {
urlFeedGc = new URL(
http://www.google.com/calendar/feeds/[email protected]/private/full);
userGc = "myUser";
passwordGc = "mtPassword";
 } catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

System.out.println(urlFeedGc);
 CalendarService myService = new CalendarService("GoogleCalendarLoader");
try {
myService.setUserCredentials(userGc, passwordGc);
} catch (AuthenticationException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
CalendarQuery myQuery = new CalendarQuery(urlFeedGc);
     //myQuery.setFullTextQuery("ssoijunndf");
     CalendarEventFeed myResultsFeed = null;
try {
 myResultsFeed = myService.query(myQuery,CalendarEventFeed.class);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (ServiceException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
     if (myResultsFeed.getEntries().size() > 0) {
      CalendarEventEntry firstMatchEntry = (CalendarEventEntry)
          myResultsFeed.getEntries().get(0);
      String myEntryTitle = firstMatchEntry.getTitle().getPlainText();
      String myEntryId = firstMatchEntry.getId();



     ret.setId(myEntryId);
     ret.setTitle(myEntryTitle);
     } System.out.println(myResultsFeed.getEntries().size());

return ret;
    }


Thanks again.
Dave


I just want to get a single event detail, starting with the ID of it. I
thought it

2011/2/14 Alain <[email protected]>

> Hello Dave,
>
> Are you looking for the Event "self" link? If this is the case, you can
> retrieve it after getting the event feeds from the Calendar API.
> You first need to send a query to the targeted calendar (as you mentioned
> earlier) which will return a list of CalendarEventEntry objects.
>
>
> http://code.google.com/apis/calendar/data/2.0/developers_guide_java.html#RetrievingWithoutQuery
>
> [CODE]
>
> for (CalendarEventEntry entry : feed.getEntries()) {
>
>   String URL = entry.getSelfLink().getHref();
>
> }
> [/CODE]
>
> However, if you are just looking for the event details, you should have
> everything you are looking for in the CalendarEventEntry object.
>
> I hope this helped!
>
> Best,
> Alain
>
> --
> 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
>

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

Reply via email to