Hi Matt,
Yes, the Java library has convenience classes to deal with the
meta-feed, while the .NET library does not.
However, you can still get to these properties using the
ExtensionElements member of the AtomEntry. Please note, you must use
the generic Service class instead of CalendarService for this task (and
AtomFeed instead of EventFeed), as CalendarService uses EventFeed which
discards the extension elements which are not known to it.
Example code follows this message.
Good luck and happy coding!
-Ryan
--
public void getCalendars()
{
Service service = new Service("cl","CalendarSampleApp");
service.setUserCredentials(this.userName, this.passWord);
FeedQuery query = new FeedQuery();
query.Uri = new
Uri("http://www.google.com/calendar/feeds/default");
AtomFeed af = service.Query(query);
foreach (AtomEntry entry in af.Entries)
{
Console.WriteLine(entry.Title.Text);
foreach (Object obj in entry.ExtensionElements)
{
if (obj is XmlNode)
{
XmlNode xn = (XmlNode)obj;
if
(GDataParserNameTable.NSGCal.Equals(xn.NamespaceURI) &&
"hidden".Equals(xn.LocalName))
{
if( xn.Attributes != null &&
xn.Attributes["value"] != null &&
"true".Equals(xn.Attributes["value"].Value))
{
Console.WriteLine("\tCalendar is hidden");
}
else
{
Console.WriteLine("\tCalendar is NOT
hidden");
}
}
else if
(GDataParserNameTable.NSGCal.Equals(xn.NamespaceURI) &&
"timezone".Equals(xn.LocalName))
{
if (xn.Attributes != null &&
xn.Attributes["value"] != null)
{
Console.WriteLine("\tTimezone: " +
xn.Attributes["value"].Value);
}
}
}
}
}
}
On Dec 5, 6:45 am, "MPH" <[EMAIL PROTECTED]> wrote:
> Still stuck on this. I get ameta-feedusing this:
>
> http://www.google.com/calendar/feeds/myuserID
>
> this returns feed with events in for each calendar but still seems to
> be missing the so called GCal namespace element references.
>
> gCal:accesslevel
> gCal:color
> gCal:hidden
> gCal:selected
> gCal:timezone
> gCal:webContent
>
> I'm no genius when it comes to using the API so any help would be
> welcomed. Are these field actually accessible trough the API or not?
>
> Thanks,
>
> Matt.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---