Reorder API.update_with_media parameters
authorHarmon <Harmon758@gmail.com>
Fri, 19 Feb 2021 23:00:57 +0000 (17:00 -0600)
committerHarmon <Harmon758@gmail.com>
Fri, 19 Feb 2021 23:00:57 +0000 (17:00 -0600)
tests/test_api.py
tweepy/api.py

index 08d8e5f7a0bc35d70086cafaf3da745d4cef7946..fbbb3da203180f7c242e3fd6565e223d3611cf3b 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('testgetuser.yaml', serializer='yaml')
index d310b147998fc94c7f0513bc23f812496a054816..5497ffe426a9c6829c022eae24828eb5cd25466c 100644 (file)
@@ -375,7 +375,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
         """
         headers, post_data = API._pack_image(filename, 3072,