编程方式添加"新的自定义字段"要使用谷歌API的接触谷歌联系人 [英] Programatically adding "New Custom Field" To Google Contacts using Google contact API
本文介绍了编程方式添加"新的自定义字段"要使用谷歌API的接触谷歌联系人的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何使用谷歌API联系方式(C#)来创建新的自定义字段到谷歌联系?
How to create new "Custom Field into Google Contact using Google Contact API (c#)?
我用:
ExtendedProperty obj_ExtendedProperty = new ExtendedProperty();
obj_ExtendedProperty.Name = "Department";
obj_ExtendedProperty.Value = "Sales";
ContactEntry.ExtendedProperties.Add(obj_ExtendedProperty);
感谢名单
推荐答案
看一看到<一个href=\"http://$c$c.google.com/intl/it/apis/gdata/javadoc/com/google/gdata/data/contacts/ContactEntry.html\"相对=nofollow> ContactEntry 类,以及如何的更新。
Have a look to ContactEntry class and how to update it.
提取您的联系:
RequestSettings rs = new RequestSettings(this.ApplicationName, this.userName,this.passWord);
ContactsRequest cr = new ContactsRequest(rs);
Contact contact = cr.Retrieve<Contact>("http://www.google.com/m8/feeds/contacts/test@gmail.com/full/12345");
更新您的联系:
UserDefinedField customField= new UserDefinedField("yourFieldName","yourFieldValue);
contact.addUserDefinedField(customField);
Contact updatedContact = cr.Update(contact);
这篇关于编程方式添加&QUOT;新的自定义字段&QUOT;要使用谷歌API的接触谷歌联系人的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文