From c6cfd9720b78c6261f4e7ab0f7da7802fc495d2e Mon Sep 17 00:00:00 2001 From: Harmon Date: Sat, 26 Dec 2020 03:55:14 -0600 Subject: [PATCH] Remove API.geo_similar_places The method was undocumented, and the API endpoint it uses hasn't been documented in years and errors now. --- tests/test_api.py | 5 ----- tweepy/api.py | 12 ------------ 2 files changed, 17 deletions(-) diff --git a/tests/test_api.py b/tests/test_api.py index 03783f4..cf1f6cb 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -365,11 +365,6 @@ class TweepyAPITests(TweepyTestCase): """Return True if a given place_name is in place_list.""" return any(x.full_name.lower() == place_name.lower() for x in place_list) - twitter_hq = self.api.geo_similar_places(lat='37.7821120598956', - long='-122.400612831116', - name='South of Market Child Care') - # Assumes that twitter_hq is first Place returned... - self.assertEqual(twitter_hq[0].id, '1d019624e6b4dcff') # Test various API functions using Austin, TX, USA self.assertEqual(self.api.geo_id(id='1ffd3558f2e98349').full_name, 'Dogpatch, San Francisco') self.assertTrue(place_name_in_list('Austin, TX', diff --git a/tweepy/api.py b/tweepy/api.py index 398b823..03eec14 100644 --- a/tweepy/api.py +++ b/tweepy/api.py @@ -1354,18 +1354,6 @@ class API(object): 'accuracy', 'max_results', 'contained_within'] ) - @property - def geo_similar_places(self): - """ :reference: https://dev.twitter.com/rest/reference/get/geo/similar_places - :allowed_param:'lat', 'long', 'name', 'contained_within' - """ - return bind_api( - api=self, - path='/geo/similar_places.json', - payload_type='place', payload_list=True, - allowed_param=['lat', 'long', 'name', 'contained_within'] - ) - @property def supported_languages(self): """ :reference: https://developer.twitter.com/en/docs/developer-utilities/supported-languages/api-reference/get-help-languages """ -- 2.25.1