Ero sivun ”Journeys API” versioiden välillä

7 merkkiä lisätty ,  17. heinäkuuta 2014 kello 02.35
Rivi 83: Rivi 83:
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  
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>
<pre>
http://data.itsfactory.fi/journeys/lines/1/?requestTime=2013-01-10
http://data.itsfactory.fi/journeys/api/1/lines?requestTime=2013-01-10
</pre>  
</pre>  
request the Journeys API would return entities from the winter schedule. Respectively, a request to url  
request the Journeys API would return entities from the winter schedule. Respectively, a request to url  
<pre>
<pre>
http://data.itsfactory.fi/journeys/lines/1/?requestTime=2013-06-10  
http://data.itsfactory.fi/journeys/api/1/lines?requestTime=2013-06-10  
</pre>
</pre>
would return entities from the summer schedule. <br>
would return entities from the summer schedule. <br>
<br>
<br>
The requestTime parameter can be omitted, in this case requestTime is considered to be the time when the client made the request.
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