If I create an event via the Calendar GUI and add a participant for
the new event by choosing that participant from my Contacts list, the
contact's name will appear in the list instead of just the email. So
if I add "Tom Thumb <[EMAIL PROTECTED]>" from my contact list, "Tom
Thumb" will appear as a participant instead of "[EMAIL PROTECTED]".
After adding the participant to an event using the Calendar app, if I
use the api to get details from the event I will get the following
(assuming I already have the relevant CalendarEventEntry and am
iterating over the participants using CalendarEventEntry.get
Participants()):
eventWho.getEmail(); // returns [EMAIL PROTECTED]
eventWho.getValueString(); // returns Tom Thumb
If however I have created my event via the API, calls to
EventWho.setValueString don't seem take. Let's say I do the following
CalendarEventEntry entry = new CalendarEventEntry();
EventWho participant = new EventWho();
participant.setEmail("[EMAIL PROTECTED]");
participant.setRel(Who.Rel.EVENT_ATTENDEE);
participant.setAttendeeStatus(Who.AttendeeStatus.EVENT_ACCEPTED);
participant.setAttendeeType(Who.AttendeeType.EVENT_OPTIONAL);
participant.setValueString("Tom Thumb");
participant.addParticipant(organizer);
entry.addParticipant(organizer);
calService.insert(CalServiceFactory.FEED_URL, entry);
If I then go and query the event after creating it, even though I set
"Tom Thumb" using setValueString(), the email address is returned
instead:
eventWho.getEmail(); // returns [EMAIL PROTECTED]
eventWho.getValueString(); // returns [EMAIL PROTECTED]
Is there something I'm doing wrong or is there just no way to set the
value string using the API?
:
Thanks,
Jason
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---