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

Resrobot v2.1 Leg Products & Stops

Hi,

I've noticed that in the v2.1 API a Trip Leg can contain multiple Products whereas a Leg contained a single product in v2. Is this a way of saying that the particular Leg is serviced by more than one operator and if so how does that square with the arrival and departure times in the Leg's Stops? I find it unlikely that two operators would service the same stop with the same arrival and departure times.

Also, since the operatorUrl has been removed any deep linking based off of this URL is now broken, if you can provide a list mapping operator codes to operator URLs that would be much appreciated.

BR
/Alex

Kommentarer

  • Hi Alexander,

    This is a change which was introduced in a 3rd party system, but isn't actively used. You can safely assume that there will only be one operator in each array, as we still deliver the same data which only has one operator per trip.

    A link to each operator's homepage can be obtained from the GTFS Sverige 2 agencies.txt file, where you will find a list of all operators. I included an example snippet below.

    agency_id,agency_name,agency_url,agency_timezone,agency_lang
    999,Samtrafiken,http://www.resrobot.se/,Europe/Stockholm,sv
    74,SJ,http://www.sj.se,Europe/Stockholm,sv
    76,NSB,http://www.nsb.no,Europe/Stockholm,sv
    229,NSB/SJ,http://www.sj.se,Europe/Stockholm,sv

    Regards,
    Bert

    Bert på Trafiklab

Kommentera eller skriv ett nytt inlägg

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