GAPI
Connection to the google api
Functions:
|
This does geocoding (get information based on Streed addres / zipcode / plus code). |
|
Specific google api request to search near a location for restaurants |
|
To get additionals informations of a specifict place (restaurant) you have to do a specific api request |
|
Search all restaurants for a specific cuisin in a specific location |
- tools.gapi.geocode(address: str) List[dict] [source]
This does geocoding (get information based on Streed addres / zipcode / plus code).
- Parameters
address (str) – The street address or plus code that you want to geocode. Specify addresses in accordance with the format used by the national postal service of the country concerned. Additional address elements such as business names and unit, suite or floor numbers should be avoided.
- Raises
schemes.exceptions.GoogleApiException – Raises if no result found for the query
- Returns
Refer to the See Also
- Return type
List[dict]
References
https://developers.google.com/maps/documentation/geocoding/requests-geocoding
- tools.gapi.nearby_search(params: dict, next_page_token: Optional[str] = None) List[schemes.scheme_rest.Restaurant] [source]
Specific google api request to search near a location for restaurants
- Parameters
params (dict) – See all available params -> https://developers.google.com/maps/documentation/places/web-service/search-nearby#optional-parameters
next_page_token (str, optional) – For recursion if the result got more than 20 results you have to search with the next_page_token. Defaults to None.
- Returns
List of all found restaurants
- Return type
- tools.gapi.place_details(restaurant: schemes.scheme_rest.Restaurant) schemes.scheme_rest.Restaurant [source]
To get additionals informations of a specifict place (restaurant) you have to do a specific api request
- Parameters
restaurant (schemes.scheme_rest.Restaurant) – The Restaurant with the palce_id
- Returns
The restaurant with all informations filled out if google got some
- Return type
schemes.scheme_restRestaurant
- tools.gapi.search_restaurant(res_filter: schemes.scheme_filter.FilterRest) List[schemes.scheme_rest.Restaurant] [source]
Search all restaurants for a specific cuisin in a specific location
- Parameters
res_filter (schemes.scheme_filter.FilterRest) – Filter for the API
- Raises
GoogleApiException – If something with the httpx went wrong
- Returns
List of all Restaurants from the google api
- Return type