Tanay
unread,Apr 12, 2011, 8:33:12 AM4/12/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google Contacts, Shared Contacts and User Profiles APIs
here is a snippet of inerting a shared contact using python as in the
api documentation
new_contact = gdata.contacts.ContactEntry(title=atom.Title(text=name))
new_contact.content = atom.Content(text=notes)
# Create a work email address for the contact and use as primary.
new_contact.email.append(gdata.contacts.Email(address=primary_email,
primary='true', rel=gdata.contacts.REL_WORK))
# Add extended properties to add data which is used in your
application.
new_contact.extended_property.append(gdata.ExtendedProperty(
name='favourite flower', value='daisy'))
sports_property = gdata.ExtendedProperty(name='sports')
sports_property.SetXmlBlob('<dance><salsa/><ballroom_dancing/></
dance>')
new_contact.extended_property.append(sports_property)
# Send the contact data to the server.
contact_entry = gd_client.CreateContact(new_contact)
1) can phone number be inserted as well
2) what is the gdata object name for Phone number and the REL values.
where can we get a total list
3) Are the extended attributes shown in the google apps email contacts
(while browsing the contacts in the inbox contacts)
4) Any snippets for editing/eleting a contact?
The API doc says
new_name = raw_input('Enter a new name for the shared contact: ')
if not selected_entry.title:
selected_entry.title = atom.Title()
selected_entry.title.text = new_name
gd_client.UpdateContact(selected_entry.GetEditLink().href,
selected_entry)
//selected_entry.GetEditLink().h
how to browse through to reach to the selected_entry