本文整理汇总了Java中com.google.api.services.mirror.Mirror.Contacts方法的典型用法代码示例。如果您正苦于以下问题:Java Mirror.Contacts方法的具体用法?Java Mirror.Contacts怎么用?Java Mirror.Contacts使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.api.services.mirror.Mirror
的用法示例。
在下文中一共展示了Mirror.Contacts方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getContact
import com.google.api.services.mirror.Mirror; //导入方法依赖的package包/类
public static Contact getContact(Credential credential, String id) throws IOException {
try {
Mirror.Contacts contacts = getMirror(credential).contacts();
return contacts.get(id).execute();
} catch (GoogleJsonResponseException e) {
LOG.warning("Could not find contact with ID " + id);
return null;
}
}
示例2: getContact
import com.google.api.services.mirror.Mirror; //导入方法依赖的package包/类
public static Contact getContact(Credential credential, String id) throws IOException {
try {
Mirror.Contacts contacts = getMirror(credential).contacts();
return contacts.get(id).execute();
} catch (GoogleJsonResponseException e) {
LOG.warning("Could not find contact with ID " + id);
return null;
}
}
示例3: getContact
import com.google.api.services.mirror.Mirror; //导入方法依赖的package包/类
public Contact getContact(String id) throws IOException {
try {
Mirror.Contacts contacts = getMirror().contacts();
return contacts.get(id).execute();
} catch (GoogleJsonResponseException e) {
logger.warn("Could not find contact with ID " + id);
return null;
}
}
示例4: insertContact
import com.google.api.services.mirror.Mirror; //导入方法依赖的package包/类
public static Contact insertContact(Credential credential, Contact contact) throws IOException {
Mirror.Contacts contacts = getMirror(credential).contacts();
return contacts.insert(contact).execute();
}
示例5: deleteContact
import com.google.api.services.mirror.Mirror; //导入方法依赖的package包/类
public static void deleteContact(Credential credential, String contactId) throws IOException {
Mirror.Contacts contacts = getMirror(credential).contacts();
contacts.delete(contactId).execute();
}
示例6: listContacts
import com.google.api.services.mirror.Mirror; //导入方法依赖的package包/类
public static ContactsListResponse listContacts(Credential credential) throws IOException {
Mirror.Contacts contacts = getMirror(credential).contacts();
return contacts.list().execute();
}
示例7: insertContact
import com.google.api.services.mirror.Mirror; //导入方法依赖的package包/类
public static Contact insertContact(Credential credential, Contact contact) throws IOException {
Mirror.Contacts contacts = getMirror(credential).contacts();
return contacts.insert(contact).execute();
}
示例8: deleteContact
import com.google.api.services.mirror.Mirror; //导入方法依赖的package包/类
public static void deleteContact(Credential credential, String contactId) throws IOException {
Mirror.Contacts contacts = getMirror(credential).contacts();
contacts.delete(contactId).execute();
}
示例9: listContacts
import com.google.api.services.mirror.Mirror; //导入方法依赖的package包/类
public static ContactsListResponse listContacts(Credential credential) throws IOException {
Mirror.Contacts contacts = getMirror(credential).contacts();
return contacts.list().execute();
}
示例10: insertContact
import com.google.api.services.mirror.Mirror; //导入方法依赖的package包/类
public Contact insertContact(Contact contact) throws IOException {
Mirror.Contacts contacts = getMirror().contacts();
return contacts.insert(contact).execute();
}
示例11: deleteContact
import com.google.api.services.mirror.Mirror; //导入方法依赖的package包/类
public void deleteContact(String contactId) throws IOException {
Mirror.Contacts contacts = getMirror().contacts();
contacts.delete(contactId).execute();
}
示例12: listContacts
import com.google.api.services.mirror.Mirror; //导入方法依赖的package包/类
public ContactsListResponse listContacts() throws IOException {
Mirror.Contacts contacts = getMirror().contacts();
return contacts.list().execute();
}