From: Harmon Date: Mon, 2 Sep 2019 04:46:45 +0000 (-0500) Subject: Optimize API.create_media_metadata X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=3c44df9e6da0264b7bc48831d1f19ec18127272e;p=tweepy.git Optimize API.create_media_metadata --- 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,