Add video upload endpoint

This commit is contained in:
Karambir Singh Nain 2015-09-23 19:00:45 +05:30
parent 00d9d6a766
commit 2cca895079
3 changed files with 83 additions and 3 deletions

View file

@ -194,7 +194,10 @@ class Twython(EndpointsMixin, object):
retry_after=response.headers.get('X-Rate-Limit-Reset'))
try:
content = response.json()
if response.status_code == 204:
content = response.content
else:
content = response.json()
except ValueError:
raise TwythonError('Response was not valid JSON. \
Unable to decode.')