From b935ae39c533bfdee7d052acdf939b68833a882a Mon Sep 17 00:00:00 2001 From: clarkzjw Date: Wed, 22 Feb 2023 17:35:28 -0800 Subject: bot: test peewee sqlite3 --- foursquare/poi.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'foursquare') diff --git a/foursquare/poi.py b/foursquare/poi.py index 5e67d1c..45b4fa9 100644 --- a/foursquare/poi.py +++ b/foursquare/poi.py @@ -3,7 +3,7 @@ import json import requests from config import FSQ_API_KEY -from dbstore.dbm_store import store_loc +from dbstore.peewee_store import create_poi POI_API_ENDPOINT = "https://api.foursquare.com/v3/places/nearby?ll={}%2C{}&limit=10" POI_SEARCH_API_ENDPOINT = "https://api.foursquare.com/v3/places/search?query={}&ll={}%2C{}&radius=2000&limit=10" @@ -33,8 +33,7 @@ def query_poi(search, latitude, longitude): "osm_url": OSM_ENDPOINT.format(poi["geocodes"]["main"]["latitude"], poi["geocodes"]["main"]["longitude"]) } locations.append(loc) - print(loc) - store_loc(loc) + create_poi(loc) return locations -- cgit v1.2.3