fix Contacts services to return iphone contacts
This commit is contained in:
parent
9bb6d75066
commit
fc9b8faff9
1 changed files with 6 additions and 16 deletions
|
@ -9,6 +9,7 @@ class ContactsService(object):
|
|||
"""
|
||||
The 'Contacts' iCloud service, connects to iCloud and returns contacts.
|
||||
"""
|
||||
|
||||
def __init__(self, service_root, session, params):
|
||||
self.session = session
|
||||
self.params = params
|
||||
|
@ -17,7 +18,7 @@ class ContactsService(object):
|
|||
self._contacts_refresh_url = '%s/startup' % self._contacts_endpoint
|
||||
self._contacts_changeset_url = '%s/changeset' % self._contacts_endpoint
|
||||
|
||||
def refresh_client(self, from_dt=None, to_dt=None):
|
||||
def refresh_client(self):
|
||||
"""
|
||||
Refreshes the ContactsService endpoint, ensuring that the
|
||||
contacts data is up-to-date.
|
||||
|
@ -33,17 +34,6 @@ class ContactsService(object):
|
|||
params=params_contacts
|
||||
)
|
||||
self.response = req.json()
|
||||
params_refresh = dict(self.params)
|
||||
params_refresh.update({
|
||||
'prefToken': req.json()["prefToken"],
|
||||
'syncToken': req.json()["syncToken"],
|
||||
})
|
||||
self.session.post(self._contacts_changeset_url, params=params_refresh)
|
||||
req = self.session.get(
|
||||
self._contacts_refresh_url,
|
||||
params=params_contacts
|
||||
)
|
||||
self.response = req.json()
|
||||
|
||||
def all(self):
|
||||
"""
|
||||
|
|
Loading…
Reference in a new issue