Update PRIM routes
continuous-integration/drone/push Build is passing Details

This commit is contained in:
nemunaire 2024-02-29 15:09:06 +01:00
parent 6a5b3471f2
commit 2530fb4649
1 changed files with 2 additions and 2 deletions

View File

@ -87,7 +87,7 @@ class IDFMAPI:
self.fnt_R_path = os.path.join(config.fonts_dir, IDFMAPI.fnt_R_path)
self.fnt_RB_path = os.path.join(config.fonts_dir, IDFMAPI.fnt_RB_path)
self.baseurl = "https://prim.iledefrance-mobilites.fr/marketplace"
self.baseurl = "https://prim.iledefrance-mobilites.fr/marketplace/v2"
self.apikey = apikey or os.environ["TOKEN_IDFM"]
self._cached_file = ".ratp-%s.cache"
@ -156,7 +156,7 @@ class IDFMAPI:
if statinfo is None or datetime.fromtimestamp(statinfo.st_mtime, tz=timezone.utc) + timedelta(minutes=self.cache_timeout) < datetime.now(tz=timezone.utc):
# Do the request and save it
req = urllib.request.Request(self.baseurl + "/navitia/line_reports/coverage/fr-idf/line_reports?count=2000")
req = urllib.request.Request(self.baseurl + "/navitia/line_reports/line_reports?count=2000")
req.headers["apikey"] = self.apikey
try:
with urllib.request.urlopen(req) as f: