here_location_services.autosuggest_api module
This module contains classes for accessing HERE Autosuggest API.
- class here_location_services.autosuggest_api.AutosuggestApi(api_key=None, auth=None, proxies=None, country='row')[source]
Bases:
here_location_services.apis.Api
A class for accessing HERE Autosuggest API.
- Parameters
api_key (Optional[str]) –
auth (Optional[here_location_services.platform.auth.Auth]) –
proxies (Optional[dict]) –
country (str) –
- __init__(api_key=None, auth=None, proxies=None, country='row')[source]
- Parameters
api_key (Optional[str]) –
auth (Optional[here_location_services.platform.auth.Auth]) –
proxies (Optional[dict]) –
country (str) –
- get_autosuggest(query, at=None, search_in_circle=None, search_in_bbox=None, in_country=None, limit=20, terms_limit=None, lang=None, political_view=None, show=None)[source]
Suggest address or place candidates based on an incomplete or misspelled query
- Parameters
query (str) – A string for free-text query. Example: res, rest
at (Optional[List]) – Specify the center of the search context expressed as list of coordinates One of at, search_in_circle or search_in_bbox is required. Parameters “at”, “search_in_circle” and “search_in_bbox” are mutually exclusive. Only one of them is allowed.
search_in_circle (Optional[here_location_services.config.autosuggest_config.SearchCircle]) – Search within a circular geographic area provided as latitude, longitude, and radius (in meters)
search_in_bbox (Optional[Tuple]) – Search within a rectangular bounding box geographic area provided as tuple of west longitude, south latitude, east longitude, north latitude
in_country (Optional[List[str]]) – Search within a specific or multiple countries provided as comma-separated ISO 3166-1 alpha-3 country codes. The country codes are to be provided in all uppercase. Must be accompanied by exactly one of at, search_in_circle or search_in_bbox.
limit (Optional[int]) – An integer specifiying maximum number of results to be returned.
terms_limit (Optional[int]) – An integer specifiying maximum number of Query Terms Suggestions to be returned.
lang (Optional[List[str]]) – List of strings to select the language to be used for result rendering from a list of BCP 47 compliant language codes.
political_view (Optional[str]) – Toggle the political view.
show (Optional[List[str]]) – Select additional fields to be rendered in the response. Please note that some of the fields involve additional webservice calls and can increase the overall response time.
- Returns
requests.Response
object.- Raises
ApiError – If
status_code
of API response is not 200.