Detta inlägg är gammalt och kan innehålla inaktuell information.

SL Reseplanerare 2

The problem with the api. api.sl.se/api2/TravelplannerV2/trip returns incorrect data in the response of the reference JourneyDetailRef. Instead of a list of stops between the departure and arrival stations returns all the stops.

Kommentarer

  • That's the way the new API works.

    To get the stops between the departure and arrival stops the stops with routeIdx from (origin+1) to (destination-1) is picked from journeyDetails.

    Example:

    <Origin name="Årsta gård" type="ST" id="400113124" lon="18.037961" lat="59.302206" routeIdx="2" time="08:30" date="2014-12-12"/>
    <Destination name="Skagersvägen" type="ST" id="400113110" lon="18.064731" lat="59.297900" routeIdx="8" time="08:37" date="2014-12-12"/>

    In this case get the stops with routeIdx 3-7.

    /Sabina

    SL

Kommentera eller skriv ett nytt inlägg

Ditt namn och inlägg kan ses av alla. Din e-post visas aldrig publikt.