Examples to work with SASAplandata
Examples
Here a little example query for the begin date of the schedule:
Request:
http://opensasa.info/SASAplandata/?type=BASIS_VER_GUELTIGKEIT
Result:
[{"VER_GUELTIGKEIT":"20140601"}]
Another Example could be
Request:
http://opensasa.info/SASAplandata/?type=REC_FRT&LI_NR=1005&TAGESART_NR=66
Response:
[
{
"LI_NR": "1005",
"tagesartlist": [
{
"TAGESART_NR": 66,
"varlist": [
{
"STR_LI_VAR": 1,
"triplist": [
{
"FRT_START": 48000,
"FGR_NR": 2,
"FRT_FID": 4541
}
]
},
{
"STR_LI_VAR": 2,
"triplist": [
{
"FRT_START": 21300,
"FGR_NR": 1,
"FRT_FID": 4909
},
{
"FRT_START": 22800,
"FGR_NR": 1,
"FRT_FID": 4864
},
{
"FRT_START": 24000,
"FGR_NR": 1,
"FRT_FID": 4889
},
{
"FRT_START": 25500,
"FGR_NR": 1,
"FRT_FID": 4902
}
]
}
]
}
]
}
]
Intresting infos
Some intresting work with the schedules can be found in the following projects: SASAbus on Github. There is a library in Java to use the data from the Webservice, which is very useful if you are a newbie to the great world of public transport.
In the following image you can see the data in you are might intrested. It shows you, how the data is connected to each other and how to manage the keys (such as primaries and unique) in your application:
Be aware that querying the trips might be a bit intensive and some MBytes of data!