Ero sivun ”Journeys API” versioiden välillä

1 152 merkkiä lisätty ,  4. heinäkuuta 2014 kello 02.59
Rivi 25: Rivi 25:


==Queries and Responses==
==Queries and Responses==
=== API-Wide URL parameters ===
==== Time ====
All Journeys API calls relate to certain time (in present, future or past). Journeys API elements are versioned over time, in other words changes in the entities are recorded with time stamps. By issuing requestTime parameter, the client can define the time from which the client wish to see the entities. For example: lets assume that a first version of time tables, lines and journeys is made 1.1.2013 (for winter schedules) and 1.6.2013 new version (for summer schedules is added). Each version would have different entities (lines, journeys etc...) since winter schedules would differ from summer schedules. Now, by issuing
<pre>
http://example.com/journeys/lines/?requestTime=2013-01-10
</pre>
request the Journeys API would return entities from the winter schedule. Respectively, a request to url
<pre>
http://example.com/journeys/lines/?requestTime=2013-06-10
</pre>
would return entities from the summer schedule. <br><br> The requestTime parameter can be omitted, in this case requestTime is considered to be the time when the client made the request.
=== Entity Queries ===
==== Lines ====
A client can access full list of LINES by making HTTP GET request to url http://example.com/journeys/lines/
A client can access full list of LINES by making HTTP GET request to url http://example.com/journeys/lines/


0

muokkausta