Rename user_ids API.lookup_users parameter to user_id
authorHarmon <Harmon758@gmail.com>
Wed, 10 Feb 2021 19:07:54 +0000 (13:07 -0600)
committerHarmon <Harmon758@gmail.com>
Wed, 10 Feb 2021 19:10:27 +0000 (13:10 -0600)
tests/test_api.py
tweepy/api.py

index 4a4d87d9123fd55306dce205ac54f802d0085f1b..9150005e88a2f5bc05227f5d25b8888bcd656417 100644 (file)
@@ -125,7 +125,7 @@ class TweepyAPITests(TweepyTestCase):
     def testlookupusers(self):
         def check(users):
             self.assertEqual(len(users), 2)
-        check(self.api.lookup_users(user_ids=[6844292, 6253282]))
+        check(self.api.lookup_users(user_id=[6844292, 6253282]))
         check(self.api.lookup_users(screen_names=['twitterapi', 'twitter']))
 
     @tape.use_cassette('testsearchusers.json')
index 5979613dda192a1d691ba7c3401fc809385e7160..6a7e0bf01a27c1e469e3a2da5dff62c92ad87823 100644 (file)
@@ -465,11 +465,11 @@ class API:
         )
 
     @payload('user', list=True)
-    def lookup_users(self, user_ids=None, screen_names=None, *args, **kwargs):
+    def lookup_users(self, user_id=None, screen_names=None, *args, **kwargs):
         """ :reference: https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference/get-users-lookup
         """
         return self.request(
-            'POST', 'users/lookup', list_to_csv(user_ids),
+            'POST', 'users/lookup', list_to_csv(user_id),
             list_to_csv(screen_names), *args, endpoint_parameters=(
                 'user_id', 'screen_name', 'include_entities', 'tweet_mode'
             ), **kwargs