From b2d8dfa2188b984042b68ed870d6bf9561596ae7 Mon Sep 17 00:00:00 2001 From: Harmon Date: Fri, 19 Feb 2021 10:29:35 -0600 Subject: [PATCH] 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 --- tweepy/api.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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'} -- 2.25.1