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中添加地方法?