In the current Provisioning API v2.0 in the .NET library, we see that
EmailList has been deprecated for Groups. Now, I'm having troubles
with RetrieveAllMembers & RetrieveGroups.  I don't know if similar
questions have been asked or if Google has reported a bug with
RetrieveGroups, but I can't find anything on them. And I've looked.

Before when we need to get a list of all members in a email list, we
could do something simple like this:

> EmailListRecipientFeed feed = service.RetrieveAllRecipients(emailList);
> foreach (EmailListRecipientEntry entry in feed.Entries)
>      Console.WriteLine(entry.Recipient.Email);

Now, with RetrieveAllMembers, is there a way to do that similarly?

This is the way I'm doing it now:

> AppsExtendedFeed extendedFeed = service.Groups.RetrieveAllMembers(groupId);
> XmlTextWriter writer = new XmlTextWriter(fileName, System.Text.Encoding.UTF8);
> writer.Formatting = Formatting.Indented;
> writer.WriteStartDocument(false);
> extendedFeed.SaveToXml(writer);
> writer.Flush();
> writer.Close();
> TextReader tr = new StreamReader(fileName);
> XmlDocument xmldoc = new XmlDocument();
> xmldoc.Load(tr);
> tr.Dispose();
> tr.Close();
> XmlNodeList xmlnode = xmldoc.GetElementsByTagName("apps:property");
> for (int i = 0; i < xmlnode.Count; i++)
> {
>      XmlAttributeCollection xmlattrc = xmlnode[i].Attributes;
>      if (xmlattrc[0].Value.Equals("memberId"))
>           Console.WriteLine(xmlattrc[1].Value);
> }

And my question with RetrieveGroups is simple.  Why is RetrieveGroups
giving me the same result as RetrieveAllGroups?  I'm trying to
retrieve all groups for a member, not retrieve all groups.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Apps APIs" 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-apps-apis?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to