From: Harmon Date: Wed, 10 Feb 2021 19:07:54 +0000 (-0600) Subject: Rename user_ids API.lookup_users parameter to user_id X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=e7d9e557f2611065cfed50dbd2fcf529f9146d65;p=tweepy.git Rename user_ids API.lookup_users parameter to user_id --- diff --git a/tests/test_api.py b/tests/test_api.py index 4a4d87d..9150005 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -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') diff --git a/tweepy/api.py b/tweepy/api.py index 5979613..6a7e0bf 100644 --- a/tweepy/api.py +++ b/tweepy/api.py @@ -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