From a9ea0c28b4b0cddbb065680a488a8487621ff346 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Thu, 14 Jan 2016 00:07:06 +0100 Subject: [PATCH] Document how to use the contacts API --- README.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.rst b/README.rst index 5f052e2..adc6cae 100644 --- a/README.rst +++ b/README.rst @@ -118,6 +118,18 @@ Alternatively, you may fetch a single event's details, like so: >>> api.calendar.get_event_detail('CALENDAR', 'EVENT_ID') +======== +Contacts +======== + +You can access your iCloud contacts/address book through the ``contacts`` property: + +>>> for c in api.contacts.all(): +>>> print c.get('firstName'), c.get('phones') +John [{u'field': u'+1 555-55-5555-5', u'label': u'MOBILE'}] + +Note: These contacts do not include contacts federated from e.g. Facebook, only the ones stored in iCloud. + ======================= File Storage (Ubiquity) =======================