Update README.rst
Changing variable name corresponding to `PyiCloudService` instance to `api` to match nearby docs.
This commit is contained in:
parent
14518d4bc8
commit
9a9200d43d
1 changed files with 4 additions and 4 deletions
|
@ -44,22 +44,22 @@ If you have enabled two-factor authentication for the account you will have to d
|
|||
|
||||
.. code-block:: python
|
||||
|
||||
if icloud.requires_2fa:
|
||||
if api.requires_2fa:
|
||||
print "Two-factor authentication required. Your trusted devices are:"
|
||||
|
||||
devices = icloud.trusted_devices
|
||||
devices = api.trusted_devices
|
||||
for i, device in enumerate(devices):
|
||||
print " %s: %s" % (i, device.get('deviceName',
|
||||
"SMS to %s" % device.get('phoneNumber')))
|
||||
|
||||
device = click.prompt('Which device would you like to use?', default=0)
|
||||
device = devices[device]
|
||||
if not icloud.send_verification_code(device):
|
||||
if not api.send_verification_code(device):
|
||||
print "Failed to send verification code"
|
||||
sys.exit(1)
|
||||
|
||||
code = click.prompt('Please enter validation code')
|
||||
if not icloud.validate_verification_code(device, code):
|
||||
if not api.validate_verification_code(device, code):
|
||||
print "Failed to verify verification code"
|
||||
sys.exit(1)
|
||||
|
||||
|
|
Loading…
Reference in a new issue