From 3c44df9e6da0264b7bc48831d1f19ec18127272e Mon Sep 17 00:00:00 2001 From: Harmon Date: Sun, 1 Sep 2019 23:46:45 -0500 Subject: [PATCH] Optimize API.create_media_metadata --- tweepy/api.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/tweepy/api.py b/tweepy/api.py index 4ffd77b..d911399 100644 --- a/tweepy/api.py +++ b/tweepy/api.py @@ -240,12 +240,10 @@ class API(object): """ :reference: https://developer.twitter.com/en/docs/media/upload-media/api-reference/post-media-metadata-create :allowed_param: """ - kwargs.update({ - 'json_payload': { - 'media_id': media_id, - 'alt_text': {'text': alt_text} - } - }) + kwargs['json_payload'] = { + 'media_id': media_id, + 'alt_text': {'text': alt_text} + } return bind_api( api=self, -- 2.25.1