def _places(client, url_part, query=None, location=None, radius=None, keyword=None, language=None, min_price=0, max_price=4, name=None, open_now=False, rank_by=None, type=None, page_token=None):
 params = {'minprice': min_price, 'maxprice': max_price}
 if query:
  params['query'] = query
 if location:
  params['location'] = convert.latlng(location)
 if radius:
  params['radius'] = radius
 if keyword:
  params['keyword'] = keyword
 if language:
  params['language'] = language
 if name:
  params['name'] = convert.join_list(' ', name)
 if open_now:
  params['opennow'] = 'true'
 if rank_by:
  params['rankby'] = rank_by
 if type:
  params['type'] = type
 if page_token:
  params['pagetoken'] = page_token
 url = ('/maps/api/place/%ssearch/json' % url_part)
 return client._get(url, params)

def _places ( client , url_part , query = None , location = None , radius = None , keyword = None , language = None , min_price = 0 , max_price = 4 , name = None , open_now = False , rank_by = None , type = None , page_token = None ) : params = { 'minprice' : min_price , 'maxprice' : max_price } if query : params [ 'query' ] = query if location : params [ 'location' ] = convert . latlng ( location ) if radius : params [ 'radius' ] = radius if keyword : params [ 'keyword' ] = keyword if language : params [ 'language' ] = language if name : params [ 'name' ] = convert . join_list ( ' ' , name ) if open_now : params [ 'opennow' ] = 'true' if rank_by : params [ 'rankby' ] = rank_by if type : params [ 'type' ] = type if page_token : params [ 'pagetoken' ] = page_token url = ( '/maps/api/place/%ssearch/json' % url_part ) return client . _get ( url , params )
internal handler for places .