

def radar_search(self, sensor=False, keyword=None, name=None, language=lang.ENGLISH, lat_lng=None, opennow=False, radius=3200, types=[], location=None):
    "Perform a radar search using the Google Places API.\n\n        One of lat_lng or location are required, the rest of the keyword\n        arguments are optional.\n\n        keyword arguments:\n        keyword  -- A term to be matched against all available fields, including\n                    but not limited to name, type, and address (default None)\n        name     -- A term to be matched against the names of Places. Results will\n                    be restricted to those containing the passed name value.\n        language -- The language code, indicating in which language the\n                    results should be returned, if possible. (default lang.ENGLISH)\n        lat_lng  -- A dict containing the following keys: lat, lng\n                    (default None)\n        location -- A human readable location, e.g 'London, England'\n                    (default None)\n        radius   -- The radius (in meters) around the location/lat_lng to\n                    restrict the search to. The maximum is 50000 meters.\n                    (default 3200)\n        opennow  -- Returns only those Places that are open for business at the time\n                    the query is sent. (default False)\n        sensor   -- Indicates whether or not the Place request came from a\n                    device using a location sensor (default False).\n        types    -- An optional list of types, restricting the results to\n                    Places (default []).\n        "
    if ((keyword is None) and (name is None) and (len(types) is 0)):
        raise ValueError('One of keyword, name or types must be supplied.')
    if ((location is None) and (lat_lng is None)):
        raise ValueError('One of location or lat_lng must be passed in.')
    try:
        radius = int(radius)
    except:
        raise ValueError('radius must be passed supplied as an integer.')
    if (sensor not in [True, False]):
        raise ValueError('sensor must be passed in as a boolean value.')
    self._request_params = {
        'radius': radius,
    }
    self._sensor = sensor
    self._request_params['location'] = self._generate_lat_lng_string(lat_lng, location)
    if (keyword is not None):
        self._request_params['keyword'] = keyword
    if (name is not None):
        self._request_params['name'] = name
    if (len(types) > 0):
        self._request_params['types'] = '|'.join(types)
    if (language is not None):
        self._request_params['language'] = language
    if (opennow is True):
        self._request_params['opennow'] = 'true'
    self._add_required_param_keys()
    (url, places_response) = _fetch_remote_json(GooglePlaces.RADAR_SEARCH_API_URL, self._request_params)
    _validate_response(url, places_response)
    return GooglePlacesSearchResult(self, places_response)

dataset/ETHPy150Open slimkrazy/python-google-places/googleplaces/__init__.py GooglePlaces.radar_search/original