2012-08-17 66 views

回答

0
import gdata.contacts.data 

new_contact = gdata.contacts.data.ContactEntry() 

# Set the contact's name. 
new_contact.name = gdata.data.Name(
    given_name=gdata.data.GivenName(text='Elizabeth'), 
    family_name=gdata.data.FamilyName(text='Bennet'), 
    full_name=gdata.data.FullName(text='Elizabeth Bennet') 
) 

# Set user defined fields 
new_contact.user_defined_field.append(
    gdata.contacts.data.UserDefinedField(
     key='Field Name', 
     value='Field Value' 
    ) 
) 
相關問題