Train schedule availability
2017-11-02 20:14:35 av ivar laks
Question regarding Train schedule availability.
Seems that it is possible to get train schedule for today (current date) and the next day. Is this correct?
Or is there data available also for longer periods - ie for a week?
Here is an example query and response for Stockholm and date 06.11.2017.
Response is empty.
{{code}}
<REQUEST>
<LOGIN authenticationkey = "...................." />
<QUERY objecttype = "TrainAnnouncement" orderby = "AdvertisedTimeAtLocation" >
<FILTER>
<AND>
<EQ name = "ActivityType" value = "Avgang" />
<EQ name = "Advertised" value = "true" />
<EQ name = "LocationSignature" value = "Cst" />
<GT name = "AdvertisedTimeAtLocation" value = "2017-11-06T00:00:00" />
<LT name = "AdvertisedTimeAtLocation" value = "2017-11-06T23:59:59" />
</AND>
</FILTER>
<INCLUDE>ActivityId</INCLUDE>
<INCLUDE>TrackAtLocation</INCLUDE>
<INCLUDE>AdvertisedTimeAtLocation</INCLUDE>
<INCLUDE>EstimatedTimeAtLocation</INCLUDE>
<INCLUDE>EstimatedTimeIsPreliminary</INCLUDE>
<INCLUDE>ToLocation</INCLUDE>
<INCLUDE>AdvertisedTrainIdent</INCLUDE>
<INCLUDE>Canceled</INCLUDE>
</QUERY>
</REQUEST>
{{/ code}}
Response:
{{code}}
{
"RESPONSE": {
"RESULT": [
{}
]
}
}
{{/ code}}
Svara