From 57e0a20512f604739f0a54ca03bc05a97626b868 Mon Sep 17 00:00:00 2001 From: Harmon Date: Fri, 19 Feb 2021 16:52:05 -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 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: -- 2.25.1