Skip to content

Commit

Permalink
👽 integrate new marudor.de API
Browse files Browse the repository at this point in the history
  • Loading branch information
jeyemwey committed Oct 25, 2021
1 parent c710cc4 commit 64164ee
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/ical.ts
Expand Up @@ -82,11 +82,9 @@ const getMarudorLink = (leg: Leg): string => {
return "";
}

const base_url = "https://marudor.de/details/";
const base_url = "https://marudor.de/api/hafas/v1/detailsRedirect/";

// TODO: Check if there is a cleaner way, e.g. with leg.tripId
// see: https://github.com/marudor/BahnhofsAbfahrten/issues/528
return `\n\nMarudor-Link: ` + base_url + leg.line.productName + " " + leg.line.fahrtNr + "/" + leg.departure + "?station=" + leg.origin.id;
return `\n\nMarudor-Link: ` + base_url + encodeURIComponent(leg.tripId);
}

export const legToEvent = ({ leg, departureTZOffset, includeTrwlLink, includeMarudorLink }: { leg: Leg, departureTZOffset: number, includeTrwlLink: boolean, includeMarudorLink: boolean }): Event | null => {
Expand Down

0 comments on commit 64164ee

Please sign in to comment.