cfg json bullcrap

This commit is contained in:
2025-01-28 17:41:50 -06:00
parent 63e79c5a4c
commit 4afc4b3ad0
19 changed files with 26 additions and 24 deletions

View File

@@ -24,7 +24,7 @@ import json
with open("conf.json", "r") as file:
cfg = json.load(file)
apiKey = cfg[twcApiKey]
apiKey = cfg["twcApiKey"]
async def getData(coopId, geocode):
fetchUrl = f"https://api.weather.com/v2/indices/achePain/daypart/7day?geocode={geocode}&language=en-US&format=xml&apiKey={apiKey}"

View File

@@ -31,7 +31,7 @@ import json
with open("conf.json", "r") as file:
cfg = json.load(file)
apiKey = cfg[twcApiKey]
apiKey = cfg["twcApiKey"]
async def getData(epaId, zipcode):
url = f"https://api.weather.com/v1/location/{zipcode}:4:US/airquality.xml?language=en-US&apiKey={apiKey}"

View File

@@ -33,7 +33,7 @@ import json
with open("conf.json", "r") as file:
cfg = json.load(file)
apiKey = cfg[twcApiKey]
apiKey = cfg["twcApiKey"]
async def getData(airport):
url = f"https://api.weather.com/v1/airportcode/{airport}/airport/delays.xml?language=en-US&apiKey={apiKey}"

View File

@@ -26,8 +26,8 @@ import json
with open("conf.json", "r") as file:
cfg = json.load(file)
headlineApiKey = cfg[twcApiKey]
detailsApiKey = cfg[twcApiKey]
headlineApiKey = cfg["twcApiKey"]
detailsApiKey = cfg["twcApiKey"]
k = 0
async def getAlerts(location):

View File

@@ -34,7 +34,7 @@ import json
with open("conf.json", "r") as file:
cfg = json.load(file)
apiKey = cfg[twcApiKey]
apiKey = cfg["twcApiKey"]
async def getData(coopId, geocode):
fetchUrl = f"https://api.weather.com/v2/indices/breathing/daypart/7day?geocode={geocode}&language=en-US&format=xml&apiKey={apiKey}"

View File

@@ -38,7 +38,7 @@ import json
with open("conf.json", "r") as file:
cfg = json.load(file)
apiKey = cfg[twcApiKey]
apiKey = cfg["twcApiKey"]
async def getData(tecci, zipCode):
l.debug('Gathering data for location id ' + tecci)

View File

@@ -36,7 +36,7 @@ import json
with open("conf.json", "r") as file:
cfg = json.load(file)
apiKey = cfg[twcApiKey]
apiKey = cfg["twcApiKey"]
async def getData(tecci, zipCode):
fetchUrl = 'https://api.weather.com/v1/location/' + zipCode + ':4:US/forecast/daily/7day.xml?language=en-US&units=e&apiKey=' + apiKey

View File

@@ -24,7 +24,7 @@ import json
with open("conf.json", "r") as file:
cfg = json.load(file)
apiKey = cfg[twcApiKey]
apiKey = cfg["twcApiKey"]
async def getData(coopId, geocode):
fetchUrl = f"https://api.weather.com/v2/indices/heatCool/daypart/7day?geocode={geocode}&language=en-US&format=xml&apiKey={apiKey}"

View File

@@ -36,7 +36,7 @@ import json
with open("conf.json", "r") as file:
cfg = json.load(file)
apiKey = cfg[twcApiKey]
apiKey = cfg["twcApiKey"]
async def getData(tecci, zipCode):
l.debug('Gathering data for location id ' + tecci)

View File

@@ -24,7 +24,7 @@ import json
with open("conf.json", "r") as file:
cfg = json.load(file)
apiKey = cfg[twcApiKey]
apiKey = cfg["twcApiKey"]
async def getData(coopId, geocode):
fetchUrl = f"https://api.weather.com/v2/indices/mosquito/daily/7day?geocode={geocode}&language=en-US&format=xml&apiKey={apiKey}"

View File

@@ -35,7 +35,7 @@ import json
with open("conf.json", "r") as file:
cfg = json.load(file)
apiKey = cfg[twcApiKey]
apiKey = cfg["twcApiKey"]
async def getData(pollenId, geocode):
fetchUrl = f"https://api.weather.com/v2/indices/pollen/daypart/7day?geocode={geocode}&language=en-US&format=xml&apiKey={apiKey}"

View File

@@ -24,7 +24,7 @@ import json
with open("conf.json", "r") as file:
cfg = json.load(file)
apiKey = cfg[twcApiKey]
apiKey = cfg["twcApiKey"]
async def getData(tideStation, geocode):
today = datetime.date.today()

View File

@@ -24,7 +24,7 @@ import json
with open("conf.json", "r") as file:
cfg = json.load(file)
apiKey = cfg[twcApiKey]
apiKey = cfg["twcApiKey"]
async def getData(coopId, geocode):
fetchUrl = f"https://api.weather.com/v2/indices/wateringNeeds/daypart/7day?geocode={geocode}&language=en-US&format=xml&apiKey={apiKey}"