“My Contacts” group google contacts

旧时模样 提交于 2019-12-04 19:19:52

Why not use the Python Client Library directly? It includes a set of methods that do exactly what you want.

import gdata.contacts.client
import gdata.contacts.data # you might also need atom.data, gdata.data

gd_client = gdata.contacts.data.ContactsClient(source='eQuiNoX_Contacts')
gd_client.ClientLogin('equinox@gmail.com', '**password**')

feed = gd_client.GetGroups()
    for entry in feed.entry:
        print 'Atom Id: %s' % group.id.text
        print 'Group Name: %s' % group.title.text
        if not entry.system_group:
            print 'Edit Link: %s' % entry.GetEditLink().href
            print 'ETag: %s' % entry.etag
        else:
            print 'System Group Id: %s' % entry.system_group.id

Does this solve your problem? It's cleaner, in a way. If you're still having trouble with:

...for some reason "My Contacts" does not show up...

then from the documentation:

Note: The feed may not contain all of the user's contact groups, because there's a default limit on the number of results returned. For more information, see the max-results query parameter in Retrieving contact groups using query parameters.

Note: The newer documentation includes sample Python code side-by-side with the protocol explanation; the Python code helps me wrap my head around the generic protocol.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!