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

How to get color of the bus and subway?

In the API key of https://www.trafiklab.se/api/sl-reseplanerare-31
https://api.sl.se/api2/TravelplannerV3_1/trip.json?key=<DIN API KEY> & parameters

Sir, I want to ask that 
how to determine the color of bus and color of subway. 
Which is the key in the api to find the color of the bus and subway?






Kommentarer

  • You can retrieve this information using the SL lines and stops API. Example data from the response:

    {
    "LineNumber": "19",
    "LineDesignation": "19",
    "DefaultTransportMode": "tunnelbanans gröna linje",
    "DefaultTransportModeCode": "METRO",
    "LastModifiedUtcDateTime": "2007-08-24 00:00:00.000",
    "ExistsFromDate": "2007-08-24 00:00:00.000"
    },
    {
    "LineNumber": "19",
    "LineDesignation": "19",
    "DefaultTransportMode": "Waxholmsbolagets",
    "DefaultTransportModeCode": "SHIP",
    "LastModifiedUtcDateTime": "2009-09-02 00:00:00.000",
    "ExistsFromDate": "2009-09-02 00:00:00.000"
    },
    {
    "LineNumber": "199",
    "LineDesignation": "199",
    "DefaultTransportMode": "",
    "DefaultTransportModeCode": "BUS",
    "LastModifiedUtcDateTime": "2007-08-24 00:00:00.000",
    "ExistsFromDate": "2007-08-24 00:00:00.000"
    },
    {
    "LineNumber": "2",
    "LineDesignation": "2",
    "DefaultTransportMode": "blåbuss",
    "DefaultTransportModeCode": "BUS",
    "LastModifiedUtcDateTime": "2007-08-24 00:00:00.000",
    "ExistsFromDate": "2007-08-24 00:00:00.000"
    },
    {
    "LineNumber": "22",
    "LineDesignation": "22",
    "DefaultTransportMode": "Tvärbanan",
    "DefaultTransportModeCode": "TRAM",
    "LastModifiedUtcDateTime": "2007-08-24 00:00:00.000",
    "ExistsFromDate": "2007-08-24 00:00:00.000"
    },

    Red busses have no special naming, blue busses are indicated by blåbuss. The metro lines are linked to their line color/line name, and trams are linked to the name of their line as well. I hope this solves your question.

    Regards,
    Bert
    Team Trafiklab

Kommentera eller skriv ett nytt inlägg

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