Ero sivun ”Journeys API” versioiden välillä

2 273 merkkiä poistettu ,  5. heinäkuuta 2014 kello 01.22
ei muokkausyhteenvetoa
Ei muokkausyhteenvetoa
Rivi 182: Rivi 182:


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).
==== Route Patterns ====
List of route patterns is not available, clients are expected to navigate to a certain route pattern via lines or routes.
A client can access specific ROUTE PATTERN'S details by issuing request at http://example.com/journeys/api/route-patterns/111
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",
                "route" : "http://example.com/journeys/api/routes/123",
                "pointsOnRoute": [
                    {
                        "latitude" : "61.48016",
                        "longitude" : "23.83057"
                    },
                    {
                        "latitude" : "60.48016",
                        "longitude" : "23.83057"
                    },
                    {
                        "latitude" : "59.48016",
                        "longitude" : "23.83057"
                    }
                ]
            }
        ]
    }
}
</pre>
A client can search ROUTE PATTERNS by issuing following requests:
* http://example.com/journeys/api/route-patterns returns all ROUTE PATTERNS
* http://example.com/journeys/api/route-patterns?routeId=111 will return ROUTE PATTERN for ROUTE with id 111
* http://example.com/journeys/api/route-patterns?startsAt=61.48016,23.83057 will return ROUTE PATTERNS that start at given coordinates
* http://example.com/journeys/api/route-patterns?startsAt=(61.48016,23.83057),(51.83057,13.83057) will return ROUTE PATTERNS that start within given coordinate box. Format: (upper left corner of the box),(lower right corner of the box)
* http://example.com/journeys/api/route-patterns?stopsAt=61.48016,23.83057 will return ROUTE PATTERNS that stop at given coordinates
* http://example.com/journeys/api/route-patterns?stopsAt=(61.48016,23.83057),(51.83057,13.83057) will return ROUTE PATTERNS that stop within given coordinate box. Format: (upper left corner of the box),(lower right corner of the box)


==== Journeys ====
==== Journeys ====
0

muokkausta