Reorder API.update_with_media parameters
authorHarmon <Harmon758@gmail.com>
Fri, 19 Feb 2021 22:52:05 +0000 (16:52 -0600)
committerHarmon <Harmon758@gmail.com>
Fri, 19 Feb 2021 22:52:05 +0000 (16:52 -0600)
tests/test_api.py
tweepy/api.py

index 85117db2832409da27875660fd0c0e5338759d92..b3ce2c9bfaa3d8ea723756eed8da90c5b4666f3c 100644 (file)
@@ -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')
index cff457052567539623fa6aea2dad861b495c8524..294041df9583104317e030845a0f75cd6bc7f594 100644 (file)
@@ -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: