Yak Shaving

just me

Google Contact API

without comments

This is more for me as a reminder.

To find the postal address from a gdata.contacts.ContactEntry use:

import atom
import gdata.contacts
import gdata.contacts.service
gd_client = gdata.contacts.service.ContactsService()
gd_client.email = 'jo@gmail.com'
gd_client.password = 'passdword'
gd_client.source = 'exampleCo-exampleApp-1'
gd_client.ProgrammaticLogin()
from lxml import etree
feed = gd_client.GetContactsFeed()
entry = feed.entry[0]
entry
entry.postal_address[0].text
'123 Fake Street'

Took me ages to figure that out…

Written by channam

July 9th, 2009 at 8:06 pm

Posted in Uncategorized

Leave a Reply