tags:

views:

15

answers:

1

I use gdata module for python to get contacts but number of contacts display in web based and from gdata is not match, Just curious ,what's wrong with it.

A: 

The default contacts feed for the Google Contacts API includes "suggestions", which are contacts containing the email addresses of previous mail senders. Unless you are trying to do autocompletion of email addresses when the user is typing, the suggestion contact entries are likely not useful.

To get the "My Contacts" list, which is the user's actual address book, first fetch the groups feed and find the ID of the My Contacts group. The My Contacts group is the entry from the groups feed with a gContact:systemGroup element having the value "Contacts".

Then with the atom id of the My Contacts group, fetch the user's contacts feed, with a query parameter "group=" specifying the My Contacts group's atom ID, properly escaped. That will limit the contacts feed returned to having just the user's actual contacts.

http://code.google.com/apis/contacts/docs/3.0/reference.html#Parameters

grobbins