aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorclarkzjw <[email protected]>2023-02-22 17:35:28 -0800
committerclarkzjw <[email protected]>2023-02-23 12:07:32 -0800
commitb935ae39c533bfdee7d052acdf939b68833a882a (patch)
tree4b744eb26eee050e02b1e1148ae2fd7fad5dc7a3 /foursquare/poi.py
parentd469f16670df2d1748a6377d1bebe9b730dc25be (diff)
downloadswarm2fediverse-b935ae39c533bfdee7d052acdf939b68833a882a.tar.gz
bot: test peewee sqlite3
Diffstat (limited to 'foursquare/poi.py')
-rw-r--r--foursquare/poi.py5
1 files changed, 2 insertions, 3 deletions
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
3import requests 3import requests
4 4
5from config import FSQ_API_KEY 5from config import FSQ_API_KEY
6from dbstore.dbm_store import store_loc 6from dbstore.peewee_store import create_poi
7 7
8POI_API_ENDPOINT = "https://api.foursquare.com/v3/places/nearby?ll={}%2C{}&limit=10" 8POI_API_ENDPOINT = "https://api.foursquare.com/v3/places/nearby?ll={}%2C{}&limit=10"
9POI_SEARCH_API_ENDPOINT = "https://api.foursquare.com/v3/places/search?query={}&ll={}%2C{}&radius=2000&limit=10" 9POI_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):
33 "osm_url": OSM_ENDPOINT.format(poi["geocodes"]["main"]["latitude"], poi["geocodes"]["main"]["longitude"]) 33 "osm_url": OSM_ENDPOINT.format(poi["geocodes"]["main"]["latitude"], poi["geocodes"]["main"]["longitude"])
34 } 34 }
35 locations.append(loc) 35 locations.append(loc)
36 print(loc) 36 create_poi(loc)
37 store_loc(loc)
38 37
39 return locations 38 return locations
40 39
Powered by cgit v1.2.3 (git 2.41.0)