This commit is contained in:
parent
6a5b3471f2
commit
2530fb4649
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user