2121
2222
2323def places (client , query , location = None , radius = None , language = None ,
24- min_price = None , max_price = None , open_now = False , type = None ,
24+ min_price = None , max_price = None , open_now = False , type = None , region = None ,
2525 page_token = None ):
2626 """
2727 Places search.
@@ -57,6 +57,10 @@ def places(client, query, location=None, radius=None, language=None,
5757 The full list of supported types is available here:
5858 https://developers.google.com/places/supported_types
5959 :type type: string
60+
61+ :param region: The region code, optional parameter.
62+ See more @ https://developers.google.com/places/web-service/search
63+ :type region: string
6064
6165 :param page_token: Token from a previous search that when provided will
6266 returns the next page of results for the same search.
@@ -69,7 +73,7 @@ def places(client, query, location=None, radius=None, language=None,
6973 """
7074 return _places (client , "text" , query = query , location = location ,
7175 radius = radius , language = language , min_price = min_price ,
72- max_price = max_price , open_now = open_now , type = type ,
76+ max_price = max_price , open_now = open_now , type = type , region = region ,
7377 page_token = page_token )
7478
7579
@@ -85,6 +89,10 @@ def places_nearby(client, location=None, radius=None, keyword=None,
8589
8690 :param radius: Distance in meters within which to bias results.
8791 :type radius: int
92+
93+ :param region: The region code, optional parameter.
94+ See more @ https://developers.google.com/places/web-service/search
95+ :type region: string
8896
8997 :param keyword: A term to be matched against all content that Google has
9098 indexed for this place.
@@ -204,7 +212,7 @@ def places_radar(client, location, radius, keyword=None, min_price=None,
204212
205213def _places (client , url_part , query = None , location = None , radius = None ,
206214 keyword = None , language = None , min_price = 0 , max_price = 4 , name = None ,
207- open_now = False , rank_by = None , type = None , page_token = None ):
215+ open_now = False , rank_by = None , type = None , region = None , page_token = None ):
208216 """
209217 Internal handler for ``places``, ``places_nearby``, and ``places_radar``.
210218 See each method's docs for arg details.
@@ -230,6 +238,8 @@ def _places(client, url_part, query=None, location=None, radius=None,
230238 params ["rankby" ] = rank_by
231239 if type :
232240 params ["type" ] = type
241+ if region :
242+ params ["region" ] = region
233243 if page_token :
234244 params ["pagetoken" ] = page_token
235245
0 commit comments