GAPI

Connection to the google api

Functions:

geocode(address)

This does geocoding (get information based on Streed addres / zipcode / plus code).

nearby_search(params[, next_page_token])

Specific google api request to search near a location for restaurants

place_details(restaurant)

To get additionals informations of a specifict place (restaurant) you have to do a specific api request

search_restaurant(res_filter)

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

Specific google api request to search near a location for restaurants

Parameters
Returns

List of all found restaurants

Return type

List[schemes.scheme_rest.Restaurant]

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

List[schemes.scheme_rest.Restaurant]