Skip to content

Commit

Permalink
Merge pull request #425 from ping/mediaupload_status
Browse files Browse the repository at this point in the history
Use GET request if the media upload command is STATUS
  • Loading branch information
michaelhelmick committed Sep 23, 2016
2 parents 3d3d32f + f7ddbcf commit a662683
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions twython/endpoints.py
Expand Up @@ -143,6 +143,10 @@ def upload_media(self, **params):
Docs:
https://dev.twitter.com/rest/reference/post/media/upload
"""
# https://dev.twitter.com/rest/reference/get/media/upload-status
if params and params.get('command', '') == 'STATUS':
return self.get('https://upload.twitter.com/1.1/media/upload.json', params=params)

return self.post('https://upload.twitter.com/1.1/media/upload.json', params=params)

def upload_video(self, media, media_type, size=None):
Expand Down

0 comments on commit a662683

Please sign in to comment.