From: Harmon Date: Fri, 19 Feb 2021 16:29:35 +0000 (-0600) Subject: Change API.chunked_upload_init parameters to be keyword-only X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=b2d8dfa2188b984042b68ed870d6bf9561596ae7;p=tweepy.git Change API.chunked_upload_init parameters to be keyword-only Change media_category and additional_owners API.chunked_upload_init parameters to be keyword-only --- diff --git a/tweepy/api.py b/tweepy/api.py index 1ec8b42..3ebc5fe 100644 --- a/tweepy/api.py +++ b/tweepy/api.py @@ -387,7 +387,8 @@ class API: fp.seek(start) media_id = self.chunked_upload_init( - file_size, file_type, media_category, *args, **kwargs + file_size, file_type, media_category=media_category, *args, + **kwargs ).media_id min_chunk_size, remainder = divmod(file_size, 1000) @@ -413,8 +414,9 @@ class API: return self.chunked_upload_finalize(media_id, *args, **kwargs) @payload('media') - def chunked_upload_init(self, total_bytes, media_type, media_category=None, - additional_owners=None, *args, **kwargs): + def chunked_upload_init(self, total_bytes, media_type, *args, + media_category=None, additional_owners=None, + **kwargs): """ :reference https://developer.twitter.com/en/docs/twitter-api/v1/media/upload-media/api-reference/post-media-upload-init """ headers = {'Content-Type': 'application/x-www-form-urlencoded'}