Ero sivun ”Journeys API” versioiden välillä

373 merkkiä poistettu ,  4. heinäkuuta 2014 kello 20.38
Rivi 106: Rivi 106:
=== Entity Queries ===
=== Entity Queries ===
==== Lines ====
==== Lines ====
A client can access paged list of LINES by making HTTP GET request to url http://example.com/journeys/api/lines/
This request would produce following response:
<pre>
{
    "headers" : {
        "dataValidityPeriod" : {
            "validFrom" : "2013-01-01",
            "validTo" : "2013-05-31"
        },
        "startIndex" : 0,
        "pageSize" : 10,
        "moreData" : false
    },
    "data" : {
        "lines":[
            {
                "href" : "http://example.com/journeys/api/lines/123",
                "name" : "13",
                "description" : "Hermia - Lukonmäki - Keskustori - Tesoma - Lamminpää - Ylöjärvi",
                "routes":[
                    {
                        "href" : "http://example.com/journeys/api/routes/123"
                    }
                ]
            }
            ...
        ]
    }
}
</pre>
A client can access specific LINE'S details by issuing request at http://example.com/journeys/api/lines/123
A client can access specific LINE'S details by issuing request at http://example.com/journeys/api/lines/123


Rivi 176: Rivi 144:
}
}
</pre>
</pre>
A client can search LINES by issuing following requests:<br>
* http://example.com/journeys/api/lines will return paged list of all LINES in the current dataValidity period
* http://example.com/journeys/api/lines?name=13 will return LINES which name contains text "13" (case-insensitive) in the current dataValidity period
* http://example.com/journeys/api/lines?description=Hermia will return LINES which description contains text "Hermia" (case-insensitive) in the current dataValidity period


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

muokkausta