Ero sivun ”Journeys API” versioiden välillä

2 490 merkkiä lisätty ,  25. huhtikuuta 2016 kello 02.33
Rivi 608: Rivi 608:


http://data.itsfactory.fi/journeys/api/1/vehicle-activity?exclude-fields=monitoredVehicleJourney.onwardCalls,recordedAtTime
http://data.itsfactory.fi/journeys/api/1/vehicle-activity?exclude-fields=monitoredVehicleJourney.onwardCalls,recordedAtTime
==Stop Monitoring==
Journeys API allows clients to access real-time location of vehicles moving through the street network from stop point perspective. To do this, client would make a HTTP GET request to url
<br><br>
http://data.itsfactory.fi/journeys/api/1/stop monitoring?stops=0001,0002
<br><br>
where stops argument contains a list of stop short names for which to fetch the data. NOTE: you can specify at maximum 100 stop short names into single request
The call would result in a following response:
<pre>
{
  1001: [
    {
      lineRef: "3R",
      directionRef: "2",
      vehicleLocation: {
        longitude: "23.7337863",
        latitude: "61.5007787"
      },
      operatorRef: "TKL",
      bearing: "70",
      delay: "-P0Y0M0DT0H1M18.000S",
      vehicleRef: "TKL_41",
      journeyPatternRef: "3R",
      originShortName: "1028",
      destinationShortName: "0002",
      originAimedDepartureTime: "2016-04-23T02:35:00+03:00",
      call: {
        vehicleAtStop: false,
        expectedArrivalTime: "2016-04-23T02:53:00+03:00",
        expectedDepartureTime: "2016-04-23T02:53:00+03:00",
        aimedArrivalTime: "2016-04-23T02:55:00+03:00",
        aimedDepartureTime: "2016-04-23T02:55:00+03:00",
        departureStatus: "onTime",
        arrivalStatus: "onTime",
        visitNumber: "24",
        vehicleLocationAtStop: {
          longitude: "23.7337863",
          latitude: "61.5007787"
        }
      }
    }
  ]
}
  ...
</pre>
The response contains a list of elements (grouped by requested stop short names) described above. Following fields are present:
* lineRef specifies the line where the bus is currently operating.
* directionRef sepecifies the direction the bus is travelling on the line. 1 = from origin stop to destination stop, 2= from destination stop back to origin stop.
* originAimedDepartureTime specifies which time the vehicle departed from the origin stop
* latitude and longitude specifies the map position of the vehicle at the time of the observation
* originShortName specifies the number of the stop where the vehicle started
* destinationShortName specifies the number of the stop where the bus is heading to
* bearing specifies the direction the vehicle is travelling
* delay specifies the relative time the vehicle is behind or ahead of its planned schedule
* vehicleRef uniquely identifies the monitored vehicle
* call element tells when the journey is expected to reach the requested stop, as well as its departure estimation


==GTFS Zip files==
==GTFS Zip files==
0

muokkausta