0
我在Python中使用Google Place API for Web Service。 和我想要添加的地方,如the tutorial here如何使用Google Place在Python中添加
我的代碼如下:
from googleplaces import GooglePlaces, types, lang, GooglePlacesError, GooglePlacesAttributeError
API_KEY = "[Google Place API KEY]"
google_places = GooglePlaces(API_KEY)
try:
added_place = google_places.add_place(
name='Mom and Pop local store',
lat_lng={'lat': 51.501984, 'lng': -0.141792},
accuracy=100,
types=types.TYPE_HOME_GOODS_STORE,
language=lang.ENGLISH_GREAT_BRITAIN)
except GooglePlacesError as error_detail:
print error_detail
我試圖改變輸入JSON格式或Python字典格式,然後它給了錯誤「google_places.add_place()只接受1參數,2給」......
是否有任何正確的方式來使用Google Place API 在Python中添加地方法?