Optimize API.create_media_metadata
authorHarmon <Harmon758@gmail.com>
Mon, 2 Sep 2019 04:46:45 +0000 (23:46 -0500)
committerHarmon <Harmon758@gmail.com>
Mon, 2 Sep 2019 04:46:45 +0000 (23:46 -0500)
tweepy/api.py

index 4ffd77bcb43e4b33743e7c74522e3a3cb94519c8..d91139918849987dcf7c7213968d1681a3840445 100644 (file)
@@ -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,