From 17a2e7cdbbea19b8630870267a92e08e9365e29d Mon Sep 17 00:00:00 2001 From: Harmon Date: Wed, 10 Feb 2021 13:12:16 -0600 Subject: [PATCH] Rename screen_names API.lookup_users parameter to screen_name --- tests/test_api.py | 2 +- tweepy/api.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_api.py b/tests/test_api.py index 9150005..089379e 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -126,7 +126,7 @@ class TweepyAPITests(TweepyTestCase): def check(users): self.assertEqual(len(users), 2) check(self.api.lookup_users(user_id=[6844292, 6253282])) - check(self.api.lookup_users(screen_names=['twitterapi', 'twitter'])) + check(self.api.lookup_users(screen_name=['twitterapi', 'twitter'])) @tape.use_cassette('testsearchusers.json') def testsearchusers(self): diff --git a/tweepy/api.py b/tweepy/api.py index 6a7e0bf..3e38e61 100644 --- a/tweepy/api.py +++ b/tweepy/api.py @@ -465,12 +465,12 @@ class API: ) @payload('user', list=True) - def lookup_users(self, user_id=None, screen_names=None, *args, **kwargs): + def lookup_users(self, user_id=None, screen_name=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_id), - list_to_csv(screen_names), *args, endpoint_parameters=( + list_to_csv(screen_name), *args, endpoint_parameters=( 'user_id', 'screen_name', 'include_entities', 'tweet_mode' ), **kwargs ) -- 2.25.1