neworganizing/simple-salesforce — pull request #36 by codingrhythm (2014-06-30 07:05:06+00:00)
Title: Add support to download content

The current lib does not support content download feature from salesforce since all API responses are decoded using JSON, but the response from content download (e.g. /services/data/v30.0/sobjects/ContentVersion/068900xxxxxxxxxxx/VersionData) does not return JSON format. I added a method called download_content in api.py to handle this situation.

How to Use

```
data = sf.query('SELECT Id, Title, ContentSize, FileType, VersionData, PathOnClient FROM ContentVersion')
if data['done']:
for record in data['records']:
doc_url = record['VersionData']
if not sf.download_content(doc_url, record['PathOnClient']):
print 'Failed'
```