Skip to content

Commit

Permalink
Make it work
Browse files Browse the repository at this point in the history
  • Loading branch information
Quentame committed Mar 20, 2020
1 parent a07602c commit 9d6c863
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions pyicloud/services/contacts.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ def refresh_client(self):
params=params_contacts
)
self.response = req.json()
params_next = dict(self.params)

params_next = dict(params_contacts)
params_next.update({
'clientVersion': '2.1',
'prefToken': req.json()["prefToken"],
'syncToken': req.json()["syncToken"],
'limit': '0',
'offset': '0',
'prefToken': self.response["prefToken"],
'syncToken': self.response["syncToken"],
'limit': '0',
'offset': '0',
})
req = self.session.get(
self._contacts_next_url,
Expand All @@ -54,4 +54,4 @@ def all(self):
Retrieves all contacts.
"""
self.refresh_client()
return self.response['contacts']
return self.response.get('contacts')

0 comments on commit 9d6c863

Please sign in to comment.