Siirry sisältöön

Ero sivun ”Journeys API” versioiden välillä

1 529 merkkiä poistettu ,  4. heinäkuuta 2014 kello 22.48
Rivi 157: Rivi 157:
         "routes" : [
         "routes" : [
             {
             {
                "id" : "123",
                 "href" : "http://example.com/journeys/api/routes/123",
                 "href" : "http://example.com/journeys/api/routes/123",
                "line" : "http://example.com/journeys/api/lines/123",
                 "pattern" : {
                 "pattern" : {
                     "href" : "http://example.com/journeys/api/route-patterns/111"
                     "href" : "http://example.com/journeys/api/route-patterns/111"
                 },
                 }
                "journeys" : [
                    {
                        "href" : "http://example.com/journeys/api/journeys/111",
                        "departureTime" : "08:00:00+0300",
                        "dayTypes" : [
                            {
                                "href" : "http://example.com/journeys/api/day-types/123"
                            }
                        ],
                        "dayTypeExceptions" : [
                            {
                                "href" : "http://example.com/journeys/api/day-type-exceptions/111"
                            }
                        ],
                        "calls" : [
                            {
                                "href" : "http://example.com/journeys/api/calls/1123",
                            },
                            {
                                "href" : "http://example.com/journeys/api/calls/1124",
                            },
                            {
                                "href" : "http://example.com/journeys/api/calls/1125",
                            }
                        ]
                    }
                ]
             }
             }
         ]
         ]
     }
     }
}
}
</pre>
</pre>
A client can search ROUTES by issuing following requests:<br>
A client can search ROUTES by issuing following requests:<br>
* http://example.com/journeys/api/routes will return paged list of all ROUTES
* http://example.com/journeys/api/routes will return paged list of all ROUTES
* http://example.com/journeys/api/routes?lineId=123 will return ROUTES which run on the LINE with id 123
* http://example.com/journeys/api/routes?lineId=123 will return ROUTES which run on the LINE with id 123
* http://example.com/journeys/api/routes?startsAtPointOnRoute=111 will return ROUTES that start from POINT ON ROUTE with id 111
* http://example.com/journeys/api/routes?stopsAtPointOnRoute=111 will return ROUTES that stops from POINT ON ROUTE with id 111
* http://example.com/journeys/api/routes?viaPointOnRoute=111 will return ROUTES that drives through POINT ON ROUTE with id 111


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).
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).
0

muokkausta