diff --git a/README.rst b/README.rst index 7c41f63..ce93109 100644 --- a/README.rst +++ b/README.rst @@ -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)