From 87abdcd40c89da6be3ddc3911fadd4e31fcf5986 Mon Sep 17 00:00:00 2001 From: Harmon Date: Fri, 19 Feb 2021 17:00:57 -0600 Subject: [PATCH] Reorder API.update_with_media parameters --- tests/test_api.py | 2 +- tweepy/api.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_api.py b/tests/test_api.py index 08d8e5f..fbbb3da 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('testgetuser.yaml', serializer='yaml') diff --git a/tweepy/api.py b/tweepy/api.py index d310b14..5497ffe 100644 --- a/tweepy/api.py +++ b/tweepy/api.py @@ -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, -- 2.25.1