From d0eb731c23e750e49af664cef882550ec21ffe81 Mon Sep 17 00:00:00 2001 From: Nahuel Lofeudo Date: Sat, 22 Apr 2023 11:28:04 +0100 Subject: [PATCH] Moved the NTA API Key to a separate file so I don't need to worry about accidentally committing it. --- api-key.txt | 1 + gtfs_client.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 api-key.txt diff --git a/api-key.txt b/api-key.txt new file mode 100644 index 0000000..dcbe830 --- /dev/null +++ b/api-key.txt @@ -0,0 +1 @@ +API KEY FROM https://developer.nationaltransport.ie/ GOES HERE \ No newline at end of file diff --git a/gtfs_client.py b/gtfs_client.py index d6aa07a..37ecd8a 100644 --- a/gtfs_client.py +++ b/gtfs_client.py @@ -16,7 +16,7 @@ import shutil class GTFSClient(): 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): self.stop_codes = stop_codes