Ero sivun ”Journeys API” versioiden välillä

1 106 merkkiä poistettu ,  17. heinäkuuta 2014 kello 03.38
Ei muokkausyhteenvetoa
Rivi 83: Rivi 83:


=== API-Wide URL parameters ===
=== 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://data.itsfactory.fi/journeys/api/1/lines?requestTime=2013-01-10
</pre>
request the Journeys API would return entities from the winter schedule. Respectively, a request to url
<pre>
http://data.itsfactory.fi/journeys/api/1/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.
==== Indent ====
==== Indent ====
Indent formats the server response to more human readable format.
Indent formats the server response to more human readable format.
0

muokkausta