Ero sivun ”Journeys API” versioiden välillä

487 merkkiä lisätty ,  17. heinäkuuta 2014 kello 01.20
Rivi 146: Rivi 146:


A client can search LINES by issuing following requests:<br>
A client can search LINES by issuing following requests:<br>
* http://example.com/journeys/api/lines will return paged list of all LINES  
* http://data.itsfactory.fi/journeys/api/1/lines will return paged list of all LINES  
* http://example.com/journeys/api/lines?lineName=13 will return LINES which name contains text "13" (case-insensitive)
* http://data.itsfactory.fi/journeys/api/1/lines?name=13 will return LINES which name contains text "13" (case-insensitive)
* http://example.com/journeys/api/lines?lineDescription=Hermia will return LINES which description contains text "Hermia" (case-insensitive)
* http://data.itsfactory.fi/journeys/api/1/lines?description=Hermia will return LINES which description contains text "Hermia" (case-insensitive)
* http://example.com/journeys/api/lines?routeId=123 will return LINES which run on the ROUTE with id 123
* http://data.itsfactory.fi/journeys/api/1/lines?routeId=123 will return LINES which run on the ROUTE with id 123
* http://example.com/journeys/api/lines?stopPointId=222 will return LINES which run via STOP POINT with id 222
* http://data.itsfactory.fi/journeys/api/1/lines?stopPointId=222 will return LINES which run via STOP POINT with id 222
* http://example.com/journeys/api/lines?firstStopPointId=111 will return LINES which start from STOP POINT with id 111
* http://data.itsfactory.fi/journeys/api/1/lines?firstStopPointId=111 will return LINES which start from STOP POINT with id 111
* http://example.com/journeys/api/lines?lastStopPointId=111 will return LINES which stop at STOP POINT with id 111
* http://data.itsfactory.fi/journeys/api/1/lines?lastStopPointId=111 will return LINES which stop at STOP POINT with id 111
* http://data.itsfactory.fi/journeys/api/1/lines?stopPointShortName=5370 will return LINES which run via STOP POINT with short name 5370
* http://data.itsfactory.fi/journeys/api/1/lines?firstStopPointShortName=5370 will return LINES which start from STOP POINT with short name 5370
* http://data.itsfactory.fi/journeys/api/1/lines?lastStopPointShortName=5370 will return LINES which stop at STOP POINT with short name 5370


These queries return response like above, with entities matching the criteria. All query parameters are exclusive (if you specify multiple conditions, the conditions are ANDed together). For example query:
These queries return response like above, with entities matching the criteria. All query parameters are exclusive (if you specify multiple conditions, the conditions are ANDed together). For example query:
* http://example.com/journeys/api/lines?routeId=123&lineName=13 will return LINES which run on the ROUTE with id 123 AND belongs to a LINE with name containing text "13" (case-insensitive)
* http://data.itsfactory.fi/journeys/api/1/lines?routeId=123&lineName=13 will return LINES which run on the ROUTE with id 123 AND belongs to a LINE with name containing text "13" (case-insensitive)


==== Routes ====
==== Routes ====
0

muokkausta