watchforstock/evohome-client — pull request #2 by andrew-blake (2014-11-09 16:43:13+00:00)
Title: Add support for file backup and restore of zone schedules

I've added the ability to backup and restore all zone schedules to a JSON file. This makes it easier to edit the schedules using an editor.
```python
In [1]: from evohomeclient2 import EvohomeClient

In [2]: client = EvohomeClient(username, password, debug=False)

In [3]: client.zone_schedules_backup('/tmp/backup.json')
Backing up zone schedule to: /tmp/backup.json
Retrieving zone schedule: 51233x - Living room
Retrieving zone schedule: 51238x - Dining room
Retrieving zone schedule: 52236x - Kitchen
Retrieving zone schedule: 53244x - Landing
Retrieving zone schedule: 54244x - Hall
Backed up zone schedule to: /tmp/backup.json

In [4]: client.zone_schedules_restore('/tmp/backup.json')
Restoring zone schedules from: /tmp/backup.json
Restoring schedule for: 51233x - Living room
Restoring schedule for: 51238x - Dining room
Restoring schedule for: 52236x - Kitchen
Restoring schedule for: 53244x - Landing
Restoring schedule for: 54244x - Hall
Restored zone schedules from: /tmp/backup.json
```

The key names and day indexing approaches of the get/set APIs are different, so I've had to make an API breaking change to the client.zone_schedule() method to return an object that is compatible with the client.set_zone_schedule() method.

Also added ability to log the HTTPS calls through new debug parameter on the client constructor. Default is no debug.