From 5d3b2e3e9b3cef7120c11dab3afcfb1502c09700 Mon Sep 17 00:00:00 2001 From: Adam Coddington Date: Sat, 18 May 2013 19:32:54 -0700 Subject: [PATCH] Updating documentation to reflect new API additions. --- README.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/README.md b/README.md index dc02d7b..4244446 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,36 @@ Authentication is as simple as passing your username and password to the `PyiClo In the event that the username/password combination is invalid, a `PyiCloudFailedLoginException` exception is thrown. +### Devices + +You can list which devices associated with your account by using the `devices` property: + +```python +>>> api.devices +{ +u'i9vbKRGIcLYqJnXMd1b257kUWnoyEBcEh6yM+IfmiMLh7BmOpALS+w==': , +u'reGYDh9XwqNWTGIhNBuEwP1ds0F/Lg5t/fxNbI4V939hhXawByErk+HYVNSUzmWV': +} +``` + +and you can access individual devices by either their index, or their ID: + +```python +>>> api.devices[0] + +>>> api.devices['i9vbKRGIcLYqJnXMd1b257kUWnoyEBcEh6yM+IfmiMLh7BmOpALS+w=='] + +``` + +or, as a shorthand if you have only one associated apple device, you can simply use the `iphone` property to access the first device associated with your account: + +```python +>>> api.iphone + +``` + +Note: the first device associated with your account may not necessarily be your iPhone. + ### Find My iPhone Once you have successfully authenticated, you can start querying your data!