SL Transport API
Enligt schemat sl-transport.json ska ska ett anrop till /sites/{id}/departures returnera ev. deviations med följande properties:
- importance
- consequence
- message
Men anrop till denna endpoint returnerar propertyn importance_level istället för importance.
Exempel:
"deviations": [
{
"importance_level": 5,
"consequence": "INFORMATION",
"message": "Invänta tid"
}
]
- importance
- consequence
- message
Men anrop till denna endpoint returnerar propertyn importance_level istället för importance.
Exempel:
"deviations": [
{
"importance_level": 5,
"consequence": "INFORMATION",
"message": "Invänta tid"
}
]
Följ inlägget
1
följare
Hälsningar,
Bert
Har hittat fler fel i schemat. Enligt schema så ska siteDeparturesResponse.stop_deviations.scope innehålla följande properties:
"description": {
"description": "A textual description of the deviation scope",
"type": "string"
},
"lines": {
"description": "Lines affected by the deviation",
"type": "string"
},
"stop_areas": {
"description": "Stop areas affected by the deviation",
"type": "string"
},
"stop_points": {
"description": "Stop points affected by the deviation",
"type": "string"
}
Men det som returneras för t.ex:
https://transport.integration.sl.se/v1/sites/9117/departures?transport=BUS&line=13&forecast=60
är:
"scope": {
"stop_areas": [
{
"id": 1131,
"name": "Odenplan",
"type": "METROSTN"
}
],
"stop_points": [
{
"id": 1121,
"name": "Rådmansgatan",
"designation": "1"
},
{
"id": 1142,
"name": "S:t Eriksplan",
"designation": "2"
},
{
"id": 1152,
"name": "Fridhemsplan",
"designation": "2"
}
],
"lines": [
{
"id": 17,
"designation": "17",
"transport_mode": "METRO",
"group_of_lines": "Tunnelbanans gröna linje"
},
{
"id": 18,
"designation": "18",
"transport_mode": "METRO",
"group_of_lines": "Tunnelbanans gröna linje"
},
{
"id": 19,
"designation": "19",
"transport_mode": "METRO",
"group_of_lines": "Tunnelbanans gröna linje"
}
]
}
Detta har åtgärdats nu, tack för att rapportera detta!
Hälsningar,
Bert