I've been able to add a comment to an existing calendar event using
the .NET client library by obtaining the event comments URI path
(this
is the same as the event uri appended with "/comments"). I'm using
something like the following:
static EventEntry AddCommentToEvent(CalendarService service,
string eventCommentsUriPath)
{
Uri eventCommentsUri = new Uri(eventCommentsUriPath);
AtomEntry myComment = new AtomEntry();
//Add comment info
myComment.Title.Text = "New Comment Title"; //NOT
RETAINED
myComment.Summary.Text = "Just another comment
summary"; //NOT RETAINED
myComment.Content.Type = "text"; //Use"html" instead &
that will make it visible in the GUI
myComment.Content.Content = "This is one comment in a
looping test of multiple comments."
//Add author
AtomPerson commentAuthor = new
AtomPerson(AtomPersonType.Author);
commentAuthor.Name = "My Name";
commentAuthor.Email = "[EMAIL PROTECTED]";
myComment.Authors.Add(commentAuthor);
AtomEntry insertedEntry =
service.Insert(eventCommentsUri , myComment);
return (EventEntry)insertedEntry;
}
PROBLEMS / QUIRKS / NOTES:
- Note that the Author (name and email) are both required.
- Also, it seems that only the content and author information is
retained (title and summary are not).
- Also, using Content.Type = "text", allows you to see the comment
in
the feed, but not in the GUI. Alternatively, use "html" to have the
comment visible in the GUI as well.
- It seems that HTML markup is typically stripped from the content
if
the tags are recognized.
- Each comment seems to be limited to around 1000-2000 characters
depending on linebreaks?
- Only 25 comments are visible in the GUI or the feed when using the
typical feed (mentioned below)
- The feed I used for the eventCommentsUriPath argument looks like
this (remove space after ".com/":
"http://www.google.com/ calendar/feeds/default/private/full/
aqt9560k4qlm64iiclinloaems/comments"
- I'm not sure how to insert a comment when adding a new event
Please make observations about calendar event comments that I've
missed.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---