1
我正在開發一個應用程序,用於使用gdata和python向谷歌聯繫人添加聯繫人詳細信息。我可以將聯繫人添加到「其他聯繫人」組,但不添加到「我的聯繫人」系統組。添加聯繫人到Google SystemGroup
這裏是編碼到目前爲止
def CreateMenu(self,nm,tp,em): new_contact = gdata.contacts.data.ContactEntry(name=gdata.data.Name(full_name=gdata.data.FullName(text=nm))) new_contact.phone_number.append(gdata.data.PhoneNumber(text=tp, primary='true', rel=gdata.data.WORK_REL)) new_contact.email.append(gdata.data.Email(address=em, rel=gdata.data.WORK_REL)) entry = self.gd_client.CreateContact(new_contact) if entry: print 'Creation successful!' print 'ID for the new contact:', entry.id.text else: print 'Upload error.'