Add video upload endpoint
This commit is contained in:
parent
00d9d6a766
commit
2cca895079
3 changed files with 83 additions and 3 deletions
|
|
@ -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.')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue