diff --git a/pyicloud/base.py b/pyicloud/base.py index 1f8571c..34bd6a6 100644 --- a/pyicloud/base.py +++ b/pyicloud/base.py @@ -248,14 +248,14 @@ class PyiCloudService(object): @property def requires_2sa(self): - """ Returns True if two-step authentication is required.""" + """Returns True if two-step authentication is required.""" return self.data.get('hsaChallengeRequired', False) \ and self.data['dsInfo'].get('hsaVersion', 0) >= 1 # FIXME: Implement 2FA for hsaVersion == 2 @property def trusted_devices(self): - """ Returns devices trusted for two-step authentication.""" + """Returns devices trusted for two-step authentication.""" request = self.session.get( '%s/listDevices' % self._setup_endpoint, params=self.params @@ -263,7 +263,7 @@ class PyiCloudService(object): return request.json().get('devices') def send_verification_code(self, device): - """ Requests that a verification code is sent to the given device""" + """Requests that a verification code is sent to the given device.""" data = json.dumps(device) request = self.session.post( '%s/sendVerificationCode' % self._setup_endpoint, @@ -273,7 +273,7 @@ class PyiCloudService(object): return request.json().get('success', False) def validate_verification_code(self, device, code): - """ Verifies a verification code received on a trusted device""" + """Verifies a verification code received on a trusted device.""" device.update({ 'verificationCode': code, 'trustBrowser': True @@ -309,7 +309,7 @@ class PyiCloudService(object): @property def devices(self): - """ Return all devices.""" + """Return all devices.""" service_root = self._get_webservice_url('findme') return FindMyiPhoneServiceManager( service_root, diff --git a/pyicloud/services/findmyiphone.py b/pyicloud/services/findmyiphone.py index 58941a8..653fa6b 100644 --- a/pyicloud/services/findmyiphone.py +++ b/pyicloud/services/findmyiphone.py @@ -7,7 +7,7 @@ from pyicloud.exceptions import PyiCloudNoDevicesException class FindMyiPhoneServiceManager(object): - """ The 'Find my iPhone' iCloud service + """The 'Find my iPhone' iCloud service This connects to iCloud and return phone data including the near-realtime latitude and longitude. @@ -28,7 +28,7 @@ class FindMyiPhoneServiceManager(object): self.refresh_client() def refresh_client(self): - """ Refreshes the FindMyiPhoneService endpoint, + """Refreshes the FindMyiPhoneService endpoint, This ensures that the location data is up-to-date. @@ -113,7 +113,7 @@ class AppleDevice(object): return self.content['location'] def status(self, additional=[]): - """ Returns status information for device. + """Returns status information for device. This returns only a subset of possible properties. """ @@ -126,7 +126,7 @@ class AppleDevice(object): return properties def play_sound(self, subject='Find My iPhone Alert'): - """ Send a request to the device to play a sound. + """Send a request to the device to play a sound. It's possible to pass a custom message by changing the `subject`. """ @@ -147,7 +147,7 @@ class AppleDevice(object): self, subject='Find My iPhone Alert', message="This is a note", sounds=False ): - """ Send a request to the device to play a sound. + """Send a request to the device to play a sound. It's possible to pass a custom message by changing the `subject`. """ @@ -171,7 +171,7 @@ class AppleDevice(object): text='This iPhone has been lost. Please call me.', newpasscode="" ): - """ Send a request to the device to trigger 'lost mode'. + """Send a request to the device to trigger 'lost mode'. The device will show the message in `text`, and if a number has been passed, then the person holding the device can call diff --git a/pyicloud/services/photos.py b/pyicloud/services/photos.py index dadd68e..8d329c6 100644 --- a/pyicloud/services/photos.py +++ b/pyicloud/services/photos.py @@ -13,7 +13,7 @@ logger = logging.getLogger(__name__) class PhotosService(object): - """ The 'Photos' iCloud service.""" + """The 'Photos' iCloud service.""" SMART_FOLDERS = { "All Photos": { "obj_type": "CPLAssetByAddedDate", diff --git a/pyicloud/services/ubiquity.py b/pyicloud/services/ubiquity.py index 5cb6020..6271e79 100644 --- a/pyicloud/services/ubiquity.py +++ b/pyicloud/services/ubiquity.py @@ -3,7 +3,7 @@ import sys class UbiquityService(object): - """ The 'Ubiquity' iCloud service.""" + """The 'Ubiquity' iCloud service.""" def __init__(self, service_root, session, params): self.session = session