return any(x.full_name.lower() == place_name.lower() for x in place_list)
# Test various API functions using Austin, TX, USA
- self.assertEqual(self.api.geo_id(id='1ffd3558f2e98349').full_name, 'Dogpatch, San Francisco')
+ self.assertEqual(self.api.geo_id(place_id='1ffd3558f2e98349').full_name, 'Dogpatch, San Francisco')
self.assertTrue(place_name_in_list('Austin, TX',
self.api.reverse_geocode(lat=30.2673701685, long= -97.7426147461))) # Austin, TX, USA
'max_results'], **kwargs
)
- def geo_id(self, *args, **kwargs):
+ def geo_id(self, place_id, *args, **kwargs):
""" :reference: https://developer.twitter.com/en/docs/geo/place-information/api-reference/get-geo-id-place_id
- :allowed_param: 'id'
+ :allowed_param:
"""
return bind_api(
*args, api=self,
- path='/geo/id/{id}.json',
- payload_type='place',
- allowed_param=['id'], **kwargs
+ path=f'/geo/id/{place_id}.json',
+ payload_type='place', **kwargs
)
def geo_search(self, *args, **kwargs):