Moved the NTA API Key to a separate file so I don't need to worry about accidentally committing it.

This commit is contained in:
Nahuel Lofeudo 2023-04-22 11:28:04 +01:00
parent e28fe74447
commit d0eb731c23
2 changed files with 2 additions and 1 deletions

1
api-key.txt Normal file
View File

@ -0,0 +1 @@
API KEY FROM https://developer.nationaltransport.ie/ GOES HERE

View File

@ -16,7 +16,7 @@ import shutil
class GTFSClient(): class GTFSClient():
GTFS_URL = "https://api.nationaltransport.ie/gtfsr/v2/gtfsr?format=json" GTFS_URL = "https://api.nationaltransport.ie/gtfsr/v2/gtfsr?format=json"
API_KEY = "" API_KEY = open("api-key.txt").read()
def __init__(self, feed_url: str, stop_codes: list[str], update_queue: queue.Queue, update_interval_seconds: int = 60): def __init__(self, feed_url: str, stop_codes: list[str], update_queue: queue.Queue, update_interval_seconds: int = 60):
self.stop_codes = stop_codes self.stop_codes = stop_codes