Skip to content

Commit

Permalink
Reorder API.update_with_media parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
Harmon758 committed Feb 19, 2021
1 parent 0ac4e83 commit 87abdcd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def testupdateanddestroystatuswithoutkwarg(self):

@tape.use_cassette('testupdatestatuswithmedia.yaml', serializer='yaml')
def testupdatestatuswithmedia(self):
update = self.api.update_with_media('examples/banner.png', status=tweet_text)
update = self.api.update_with_media(tweet_text, 'examples/banner.png')
self.assertIn(tweet_text + ' https://t.co', update.text)

@tape.use_cassette('testgetuser.yaml', serializer='yaml')
Expand Down
2 changes: 1 addition & 1 deletion tweepy/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ def create_media_metadata(self, media_id, alt_text, **kwargs):
)

@payload('status')
def update_with_media(self, filename, status, *, file=None, **kwargs):
def update_with_media(self, status, filename, *, file=None, **kwargs):
""" :reference: https://developer.twitter.com/en/docs/tweets/post-and-engage/api-reference/post-statuses-update_with_media
"""
headers, post_data = API._pack_image(filename, 3072,
Expand Down

0 comments on commit 87abdcd

Please sign in to comment.