From: Harmon Date: Fri, 19 Feb 2021 22:52:05 +0000 (-0600) Subject: Reorder API.update_with_media parameters X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=57e0a20512f604739f0a54ca03bc05a97626b868;p=tweepy.git Reorder API.update_with_media parameters --- diff --git a/tests/test_api.py b/tests/test_api.py index 85117db..b3ce2c9 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -110,7 +110,7 @@ class TweepyAPITests(TweepyTestCase): @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('testmediauploadpng.yaml', serializer='yaml') diff --git a/tweepy/api.py b/tweepy/api.py index cff4570..294041d 100644 --- a/tweepy/api.py +++ b/tweepy/api.py @@ -484,7 +484,7 @@ class API: ) @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 """ if file is not None: