approved, byrokraatit, ylläpitäjät
0
muokkausta
(→Routes) |
(→Routes) |
||
Rivi 260: | Rivi 260: | ||
} | } | ||
] | ] | ||
} | |||
] | |||
} | |||
] | |||
} | |||
} | |||
</pre> | |||
==== ROUTE PATTERNS ==== | |||
A client can access paged list of ROUTE PATTERNS by making HTTP GET request to url http://example.com/journeys/api/route-patterns | |||
This request would produce following response: | |||
<pre> | |||
{ | |||
"headers" : { | |||
"dataValidityPeriod" : { | |||
"validFrom" : "2013-01-01", | |||
"validTo" : "2013-05-31" | |||
}, | |||
"startIndex" : 0, | |||
"pageSize" : 10, | |||
"moreData" : false | |||
}, | |||
"data" : { | |||
"route-patterns" : [ | |||
{ | |||
"href" : "http://example.com/journeys/api/route-patterns/111", | |||
"pointsOnRoute": [ | |||
{ | |||
"href" : "http://example.com/journeys/api/points-on-routes/111", | |||
"latitude" : "61.48016", | |||
"longitude" : "23.83057" | |||
}, | |||
{ | |||
"href" : "http://example.com/journeys/api/points-on-routes/112", | |||
"latitude" : "60.48016", | |||
"longitude" : "23.83057" | |||
}, | |||
{ | |||
"href" : "http://example.com/journeys/api/points-on-routes/113", | |||
"latitude" : "59.48016", | |||
"longitude" : "23.83057" | |||
} | |||
] | |||
} | |||
... | |||
] | |||
} | |||
} | |||
</pre> | |||
A client can access specific ROUTE PATTERN'S details by issuing request at http://example.com/journeys/api/route-patterns/123 | |||
This request would produce following response: | |||
<pre> | |||
{ | |||
"headers" : { | |||
"dataValidityPeriod" : { | |||
"validFrom" : "2013-01-01", | |||
"validTo" : "2013-05-31" | |||
}, | |||
"startIndex" : 0, | |||
"pageSize" : 1, | |||
"moreData" : false | |||
}, | |||
"data" : { | |||
"route-patterns" : [ | |||
{ | |||
"href" : "http://example.com/journeys/api/route-patterns/111", | |||
"pointsOnRoute": [ | |||
{ | |||
"href" : "http://example.com/journeys/api/points-on-routes/111", | |||
"latitude" : "61.48016", | |||
"longitude" : "23.83057" | |||
}, | |||
{ | |||
"href" : "http://example.com/journeys/api/points-on-routes/112", | |||
"latitude" : "60.48016", | |||
"longitude" : "23.83057" | |||
}, | |||
{ | |||
"href" : "http://example.com/journeys/api/points-on-routes/112", | |||
"latitude" : "59.48016", | |||
"longitude" : "23.83057" | |||
} | } | ||
] | ] |