Remove API.geo_similar_places
authorHarmon <Harmon758@gmail.com>
Sat, 26 Dec 2020 09:55:14 +0000 (03:55 -0600)
committerHarmon <Harmon758@gmail.com>
Sat, 26 Dec 2020 09:55:28 +0000 (03:55 -0600)
The method was undocumented, and the API endpoint it uses hasn't been documented in years and errors now.

tests/test_api.py
tweepy/api.py

index 03783f41590f4fd74dedc5c65668da9a6575adfd..cf1f6cba2b37e299aa9430e784ecb3b52397655e 100644 (file)
@@ -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',
index 398b823db1f63f15c39594ce34d8fb1f11c80ab9..03eec1483445f5e255c060db231da3ee814d6a49 100644 (file)
@@ -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 """