Hi,

I'm working in PHP, I get a list of the user groups with code similar
to the below.

  protected $target = 'https://www.google.com/m8/feeds/groups/default/full';
  function getList() {
    return $this->list;
  }
  function setList($token) {
    $xmlfile = $this->target . '?oauth_token=' . $token;
    $this->list = simplexml_load_file($xmlfile. '&v=3.0');
  }

Then iterate over the list looking for the group ID based on the title
of the Groups I'm interested in.

  foreach ($groupList->entry as $e) {
    if ($e->title == 'Some group') {
      $groupId = $e->id;
    }
  }

Finally apply a filter using the $groupId

  foreach ($contactList->entry as $e) {
    $numFound++;
    $p = $dz->getPerson($e);
    // we only care about Contacts in Some group
    if ($p->groupId == $groupId) {
       ...

Perhaps there's a better way, but this is working for me.

Gavin


On 30 March 2012 16:58, JustAnUser <[email protected]> wrote:
>
> I am working on a rails application that requires me to import
> contacts. But when i try to import contacts using
> https://www.google.com/m8/feeds/contacts/default/full?max-results=10000
> it gives me all the contacts or a large subset of contact. But I only
> need contacts from certain groups (such as My Contacts or friends
> etc).
> So, i tried this         "https://www.google.com/m8/feeds/contacts/
> default/full?max-results=10000&group=http%3A%2F%2Fwww.google.com
> %2Fm8%2Ffeeds%2Fgroups%2Fuser%40gmail.com%2Fbase%2F6"
>
> I also tried the same link without URL encoding ( "https://
> www.google.com/m8/feeds/contacts/default/full?max-results=10000&group=http://www.google.com/m8/feeds/groups/akif.hossian.92%40gmail.com/base/6";).
> but both of them doesn't work. In some cases it returns 0 results and
> some other cases, it says groups not available (even though there is
> contacts in it). Is there anything that I am missing here that is
> causing me to get no results.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Google Contacts, Shared Contacts and User Profiles 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://code.google.com/apis/contacts/community/forum.html




--
[email protected] will expire please update your records

-- 
You received this message because you are subscribed to the Google
Groups "Google Contacts, Shared Contacts and User Profiles 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://code.google.com/apis/contacts/community/forum.html

Reply via email to