Skip to content

Instantly share code, notes, and snippets.

@leighghunt
Last active October 15, 2020 06:59
Show Gist options
  • Save leighghunt/b366a3bfa4dcd374e91a71a8c1079e9e to your computer and use it in GitHub Desktop.
Save leighghunt/b366a3bfa4dcd374e91a71a8c1079e9e to your computer and use it in GitHub Desktop.
MetlinkAPIWeirdness

Tweet with screenshots: https://twitter.com/leighghunt/status/1316610018154700800

Trains in question: 2 trains outbound -> WAIK reported as arriving at Paremata within one or two minutes of each other.

These refer to this data being displayed: https://twitter.com/leighghunt/status/1316610018154700800/photo/2

Looks like the entry for 4295 isn't getting updated correctly in the StopDepartures/PARE feed?

Some extracts of the JSON files attached.

"LastModified": "2020-10-15T18:17:05+13:00",

4274:

      "AimedArrival": "2020-10-15T18:16:00+13:00",
      "AimedDeparture": "2020-10-15T18:16:00+13:00",
      "VehicleFeature": null,
      "DepartureStatus": "onTime",
      "ExpectedDeparture": "2020-10-15T18:17:56+13:00",
      "DisplayDeparture": "2020-10-15T18:17:56+13:00",
      "DisplayDepartureSeconds": 59,

4295:

      "AimedArrival": "2020-10-15T17:39:00+13:00",
      "AimedDeparture": "2020-10-15T17:39:00+13:00",
      "VehicleFeature": null,
      "DepartureStatus": "delayed",
      "ExpectedDeparture": "2020-10-15T18:21:20+13:00",
      "DisplayDeparture": "2020-10-15T18:21:20+13:00",
      "DisplayDepartureSeconds": 263,

Positions of these trains about this time: 4274:

    {
      "RecordedAtTime": "2020-10-15T18:15:15+13:00",
      "VehicleRef": "4274",
      "ServiceID": "KPL",
      "HasStarted": true,
      "DepartureTime": "2020-10-15T17:55:00+13:00",
      "OriginStopID": "WELL",
      "OriginStopName": "WgtnStn",
      "DestinationStopID": "WAIK",
      "DestinationStopName": "WaikanaeStn",
      "Direction": "Outbound",
      "Bearing": "336",
      "BehindSchedule": true,
      "VehicleFeature": null,
      "DelaySeconds": 160,
      "Lat": "-41.1324615",
      "Long": "174.8434143",
      "Service": {
        "Code": "KPL",
        "TrimmedCode": "KPL",
        "Name": "Kapiti Line (Wellington - Waikanae)",
        "Mode": "Train",
        "Link": "/timetables/train/KPL"
      }
    },

4295:

    {
      "RecordedAtTime": "2020-10-15T18:15:15+13:00",
      "VehicleRef": "4295",
      "ServiceID": "KPL",
      "HasStarted": true,
      "DepartureTime": "2020-10-15T17:18:00+13:00",
      "OriginStopID": "WELL",
      "OriginStopName": "WgtnStn",
      "DestinationStopID": "WAIK",
      "DestinationStopName": "WaikanaeStn",
      "Direction": "Outbound",
      "Bearing": "60",
      "BehindSchedule": true,
      "VehicleFeature": null,
      "DelaySeconds": 122,
      "Lat": "-40.8874626",
      "Long": "175.0389709",
      "Service": {
        "Code": "KPL",
        "TrimmedCode": "KPL",
        "Name": "Kapiti Line (Wellington - Waikanae)",
        "Mode": "Train",
        "Link": "/timetables/train/KPL"
      }
    }
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
// 20201015181534
// https://www.metlink.org.nz/api/v1/ServiceLocation/KPL
{
"LastModified": "2020-10-15T18:15:21+13:00",
"Services": [
{
"RecordedAtTime": "2020-10-15T18:15:15+13:00",
"VehicleRef": "4229",
"ServiceID": "KPL",
"HasStarted": true,
"DepartureTime": "2020-10-15T18:05:00+13:00",
"OriginStopID": "WAIK",
"OriginStopName": "WaikanaeStn",
"DestinationStopID": "WELL",
"DestinationStopName": "WgtnStn",
"Direction": "Inbound",
"Bearing": "174",
"BehindSchedule": true,
"VehicleFeature": null,
"DelaySeconds": 58,
"Lat": "-40.9395981",
"Long": "174.9938965",
"Service": {
"Code": "KPL",
"TrimmedCode": "KPL",
"Name": "Kapiti Line (Waikanae - Wellington)",
"Mode": "Train",
"Link": "/timetables/train/KPL"
}
},
{
"RecordedAtTime": "2020-10-15T18:15:15+13:00",
"VehicleRef": "4237",
"ServiceID": "KPL",
"HasStarted": true,
"DepartureTime": "2020-10-15T17:20:00+13:00",
"OriginStopID": "WAIK",
"OriginStopName": "WaikanaeStn",
"DestinationStopID": "WELL",
"DestinationStopName": "WgtnStn",
"Direction": "Inbound",
"Bearing": "168",
"BehindSchedule": true,
"VehicleFeature": null,
"DelaySeconds": 175,
"Lat": "-41.2018967",
"Long": "174.8200684",
"Service": {
"Code": "KPL",
"TrimmedCode": "KPL",
"Name": "Kapiti Line (Waikanae - Wellington)",
"Mode": "Train",
"Link": "/timetables/train/KPL"
}
},
{
"RecordedAtTime": "2020-10-15T18:15:15+13:00",
"VehicleRef": "4253",
"ServiceID": "KPL",
"HasStarted": true,
"DepartureTime": "2020-10-15T17:41:00+13:00",
"OriginStopID": "WAIK",
"OriginStopName": "WaikanaeStn",
"DestinationStopID": "WELL",
"DestinationStopName": "WgtnStn",
"Direction": "Inbound",
"Bearing": "150",
"BehindSchedule": true,
"VehicleFeature": null,
"DelaySeconds": 128,
"Lat": "-41.0941010",
"Long": "174.8680573",
"Service": {
"Code": "KPL",
"TrimmedCode": "KPL",
"Name": "Kapiti Line (Waikanae - Wellington)",
"Mode": "Train",
"Link": "/timetables/train/KPL"
}
},
{
"RecordedAtTime": "2020-10-15T18:15:15+13:00",
"VehicleRef": "4264",
"ServiceID": "KPL",
"HasStarted": true,
"DepartureTime": "2020-10-15T17:35:00+13:00",
"OriginStopID": "WELL",
"OriginStopName": "WgtnStn",
"DestinationStopID": "WAIK",
"DestinationStopName": "WaikanaeStn",
"Direction": "Outbound",
"Bearing": "84",
"BehindSchedule": true,
"VehicleFeature": null,
"DelaySeconds": 387,
"Lat": "-41.0331001",
"Long": "174.8920288",
"Service": {
"Code": "KPL",
"TrimmedCode": "KPL",
"Name": "Kapiti Line (Wellington - Waikanae)",
"Mode": "Train",
"Link": "/timetables/train/KPL"
}
},
{
"RecordedAtTime": "2020-10-15T18:15:15+13:00",
"VehicleRef": "4265",
"ServiceID": "KPL",
"HasStarted": true,
"DepartureTime": "2020-10-15T18:01:00+13:00",
"OriginStopID": "WELL",
"OriginStopName": "WgtnStn",
"DestinationStopID": "PORI2",
"DestinationStopName": "PoriruaStn",
"Direction": "Outbound",
"Bearing": "300",
"BehindSchedule": true,
"VehicleFeature": null,
"DelaySeconds": 135,
"Lat": "-41.1835594",
"Long": "174.8269806",
"Service": {
"Code": "KPL",
"TrimmedCode": "KPL",
"Name": "Kapiti Line (Wellington - Waikanae)",
"Mode": "Train",
"Link": "/timetables/train/KPL"
}
},
{
"RecordedAtTime": "2020-10-15T18:15:15+13:00",
"VehicleRef": "4274",
"ServiceID": "KPL",
"HasStarted": true,
"DepartureTime": "2020-10-15T17:55:00+13:00",
"OriginStopID": "WELL",
"OriginStopName": "WgtnStn",
"DestinationStopID": "WAIK",
"DestinationStopName": "WaikanaeStn",
"Direction": "Outbound",
"Bearing": "336",
"BehindSchedule": true,
"VehicleFeature": null,
"DelaySeconds": 160,
"Lat": "-41.1324615",
"Long": "174.8434143",
"Service": {
"Code": "KPL",
"TrimmedCode": "KPL",
"Name": "Kapiti Line (Wellington - Waikanae)",
"Mode": "Train",
"Link": "/timetables/train/KPL"
}
},
{
"RecordedAtTime": "2020-10-15T18:14:55+13:00",
"VehicleRef": "4285",
"ServiceID": "KPL",
"HasStarted": true,
"DepartureTime": "2020-10-15T18:14:00+13:00",
"OriginStopID": "WELL",
"OriginStopName": "WgtnStn",
"DestinationStopID": "WAIK",
"DestinationStopName": "WaikanaeStn",
"Direction": "Outbound",
"Bearing": "12",
"BehindSchedule": false,
"VehicleFeature": null,
"DelaySeconds": 0,
"Lat": "-41.2774887",
"Long": "174.7816467",
"Service": {
"Code": "KPL",
"TrimmedCode": "KPL",
"Name": "Kapiti Line (Wellington - Waikanae)",
"Mode": "Train",
"Link": "/timetables/train/KPL"
}
},
{
"RecordedAtTime": "2020-10-15T18:15:15+13:00",
"VehicleRef": "4295",
"ServiceID": "KPL",
"HasStarted": true,
"DepartureTime": "2020-10-15T17:18:00+13:00",
"OriginStopID": "WELL",
"OriginStopName": "WgtnStn",
"DestinationStopID": "WAIK",
"DestinationStopName": "WaikanaeStn",
"Direction": "Outbound",
"Bearing": "60",
"BehindSchedule": true,
"VehicleFeature": null,
"DelaySeconds": 122,
"Lat": "-40.8874626",
"Long": "175.0389709",
"Service": {
"Code": "KPL",
"TrimmedCode": "KPL",
"Name": "Kapiti Line (Wellington - Waikanae)",
"Mode": "Train",
"Link": "/timetables/train/KPL"
}
}
]
}
// 20201015181720
// https://www.metlink.org.nz/api/v1/StopDepartures/PARE
{
"LastModified": "2020-10-15T18:17:05+13:00",
"Stop": {
"Name": "Paremata Station",
"Sms": "PARE",
"Farezone": "6/5",
"Lat": -41.1063152,
"Long": 174.8662679,
"LastModified": "2020-10-15T00:02:11+13:00"
},
"Services": [
{
"ServiceID": "KPL",
"IsRealtime": true,
"VehicleRef": "4253",
"Direction": "Inbound",
"OperatorRef": "RAIL",
"OriginStopID": "WAIK",
"OriginStopName": "WaikanaeStn",
"DestinationStopID": "WELL",
"DestinationStopName": "WELL-All stops",
"AimedArrival": "2020-10-15T18:16:00+13:00",
"AimedDeparture": "2020-10-15T18:16:00+13:00",
"VehicleFeature": null,
"DepartureStatus": "onTime",
"ExpectedDeparture": "2020-10-15T18:17:28+13:00",
"DisplayDeparture": "2020-10-15T18:17:28+13:00",
"DisplayDepartureSeconds": 31,
"Service": {
"Code": "KPL",
"TrimmedCode": "KPL",
"Name": "Kapiti Line (Waikanae - Wellington)",
"Mode": "Train",
"Link": "/timetables/train/KPL"
}
},
{
"ServiceID": "KPL",
"IsRealtime": true,
"VehicleRef": "4274",
"Direction": "Outbound",
"OperatorRef": "RAIL",
"OriginStopID": "WELL",
"OriginStopName": "WgtnStn",
"DestinationStopID": "WAIK",
"DestinationStopName": "WAIK-All stops",
"AimedArrival": "2020-10-15T18:16:00+13:00",
"AimedDeparture": "2020-10-15T18:16:00+13:00",
"VehicleFeature": null,
"DepartureStatus": "onTime",
"ExpectedDeparture": "2020-10-15T18:17:56+13:00",
"DisplayDeparture": "2020-10-15T18:17:56+13:00",
"DisplayDepartureSeconds": 59,
"Service": {
"Code": "KPL",
"TrimmedCode": "KPL",
"Name": "Kapiti Line (Waikanae - Wellington)",
"Mode": "Train",
"Link": "/timetables/train/KPL"
}
},
{
"ServiceID": "KPL",
"IsRealtime": true,
"VehicleRef": "4295",
"Direction": "Outbound",
"OperatorRef": "RAIL",
"OriginStopID": "WELL",
"OriginStopName": "WgtnStn",
"DestinationStopID": "WAIK",
"DestinationStopName": "WAIK-All stops",
"AimedArrival": "2020-10-15T17:39:00+13:00",
"AimedDeparture": "2020-10-15T17:39:00+13:00",
"VehicleFeature": null,
"DepartureStatus": "delayed",
"ExpectedDeparture": "2020-10-15T18:21:20+13:00",
"DisplayDeparture": "2020-10-15T18:21:20+13:00",
"DisplayDepartureSeconds": 263,
"Service": {
"Code": "KPL",
"TrimmedCode": "KPL",
"Name": "Kapiti Line (Waikanae - Wellington)",
"Mode": "Train",
"Link": "/timetables/train/KPL"
}
},
{
"ServiceID": "KPL",
"IsRealtime": true,
"VehicleRef": "4285",
"Direction": "Outbound",
"OperatorRef": "RAIL",
"OriginStopID": "WELL",
"OriginStopName": "WgtnStn",
"DestinationStopID": "WAIK",
"DestinationStopName": "WAIK-All stops",
"AimedArrival": "2020-10-15T18:39:00+13:00",
"AimedDeparture": "2020-10-15T18:39:00+13:00",
"VehicleFeature": null,
"DepartureStatus": "onTime",
"ExpectedDeparture": "2020-10-15T18:39:49+13:00",
"DisplayDeparture": "2020-10-15T18:39:49+13:00",
"DisplayDepartureSeconds": 1372,
"Service": {
"Code": "KPL",
"TrimmedCode": "KPL",
"Name": "Kapiti Line (Waikanae - Wellington)",
"Mode": "Train",
"Link": "/timetables/train/KPL"
}
},
{
"ServiceID": "KPL",
"IsRealtime": true,
"VehicleRef": "4229",
"Direction": "Inbound",
"OperatorRef": "RAIL",
"OriginStopID": "WAIK",
"OriginStopName": "WaikanaeStn",
"DestinationStopID": "WELL",
"DestinationStopName": "WELL-All stops",
"AimedArrival": "2020-10-15T18:40:00+13:00",
"AimedDeparture": "2020-10-15T18:40:00+13:00",
"VehicleFeature": null,
"DepartureStatus": "onTime",
"ExpectedDeparture": "2020-10-15T18:40:00+13:00",
"DisplayDeparture": "2020-10-15T18:40:00+13:00",
"DisplayDepartureSeconds": 1383,
"Service": {
"Code": "KPL",
"TrimmedCode": "KPL",
"Name": "Kapiti Line (Waikanae - Wellington)",
"Mode": "Train",
"Link": "/timetables/train/KPL"
}
},
{
"ServiceID": "KPL",
"IsRealtime": false,
"VehicleRef": null,
"Direction": "Outbound",
"OperatorRef": "RAIL",
"OriginStopID": "WELL",
"OriginStopName": "WgtnStn",
"DestinationStopID": "WAIK",
"DestinationStopName": "WAIK-All stops",
"AimedArrival": "2020-10-15T19:09:00+13:00",
"AimedDeparture": "2020-10-15T19:09:00+13:00",
"VehicleFeature": null,
"DepartureStatus": null,
"ExpectedDeparture": null,
"DisplayDeparture": "2020-10-15T19:09:00+13:00",
"DisplayDepartureSeconds": 3123,
"Service": {
"Code": "KPL",
"TrimmedCode": "KPL",
"Name": "Kapiti Line (Waikanae - Wellington)",
"Mode": "Train",
"Link": "/timetables/train/KPL"
}
},
{
"ServiceID": "KPL",
"IsRealtime": false,
"VehicleRef": null,
"Direction": "Inbound",
"OperatorRef": "RAIL",
"OriginStopID": "WAIK",
"OriginStopName": "WaikanaeStn",
"DestinationStopID": "WELL",
"DestinationStopName": "WELL-All stops",
"AimedArrival": "2020-10-15T19:16:00+13:00",
"AimedDeparture": "2020-10-15T19:16:00+13:00",
"VehicleFeature": null,
"DepartureStatus": null,
"ExpectedDeparture": null,
"DisplayDeparture": "2020-10-15T19:16:00+13:00",
"DisplayDepartureSeconds": 3543,
"Service": {
"Code": "KPL",
"TrimmedCode": "KPL",
"Name": "Kapiti Line (Waikanae - Wellington)",
"Mode": "Train",
"Link": "/timetables/train/KPL"
}
},
{
"ServiceID": "KPL",
"IsRealtime": false,
"VehicleRef": null,
"Direction": "Inbound",
"OperatorRef": "RAIL",
"OriginStopID": "WAIK",
"OriginStopName": "WaikanaeStn",
"DestinationStopID": "WELL",
"DestinationStopName": "WELL-All stops",
"AimedArrival": "2020-10-15T19:35:00+13:00",
"AimedDeparture": "2020-10-15T19:35:00+13:00",
"VehicleFeature": null,
"DepartureStatus": null,
"ExpectedDeparture": null,
"DisplayDeparture": "2020-10-15T19:35:00+13:00",
"DisplayDepartureSeconds": 4683,
"Service": {
"Code": "KPL",
"TrimmedCode": "KPL",
"Name": "Kapiti Line (Waikanae - Wellington)",
"Mode": "Train",
"Link": "/timetables/train/KPL"
}
},
{
"ServiceID": "KPL",
"IsRealtime": false,
"VehicleRef": null,
"Direction": "Outbound",
"OperatorRef": "RAIL",
"OriginStopID": "WELL",
"OriginStopName": "WgtnStn",
"DestinationStopID": "WAIK",
"DestinationStopName": "WAIK-All stops",
"AimedArrival": "2020-10-15T19:39:00+13:00",
"AimedDeparture": "2020-10-15T19:39:00+13:00",
"VehicleFeature": null,
"DepartureStatus": null,
"ExpectedDeparture": null,
"DisplayDeparture": "2020-10-15T19:39:00+13:00",
"DisplayDepartureSeconds": 4923,
"Service": {
"Code": "KPL",
"TrimmedCode": "KPL",
"Name": "Kapiti Line (Waikanae - Wellington)",
"Mode": "Train",
"Link": "/timetables/train/KPL"
}
},
{
"ServiceID": "KPL",
"IsRealtime": false,
"VehicleRef": null,
"Direction": "Inbound",
"OperatorRef": "RAIL",
"OriginStopID": "WAIK",
"OriginStopName": "WaikanaeStn",
"DestinationStopID": "WELL",
"DestinationStopName": "WELL-All stops",
"AimedArrival": "2020-10-15T20:05:00+13:00",
"AimedDeparture": "2020-10-15T20:05:00+13:00",
"VehicleFeature": null,
"DepartureStatus": null,
"ExpectedDeparture": null,
"DisplayDeparture": "2020-10-15T20:05:00+13:00",
"DisplayDepartureSeconds": 6483,
"Service": {
"Code": "KPL",
"TrimmedCode": "KPL",
"Name": "Kapiti Line (Waikanae - Wellington)",
"Mode": "Train",
"Link": "/timetables/train/KPL"
}
},
{
"ServiceID": "KPL",
"IsRealtime": false,
"VehicleRef": null,
"Direction": "Outbound",
"OperatorRef": "RAIL",
"OriginStopID": "WELL",
"OriginStopName": "WgtnStn",
"DestinationStopID": "WAIK",
"DestinationStopName": "WAIK-All stops",
"AimedArrival": "2020-10-15T20:09:00+13:00",
"AimedDeparture": "2020-10-15T20:09:00+13:00",
"VehicleFeature": null,
"DepartureStatus": null,
"ExpectedDeparture": null,
"DisplayDeparture": "2020-10-15T20:09:00+13:00",
"DisplayDepartureSeconds": 6723,
"Service": {
"Code": "KPL",
"TrimmedCode": "KPL",
"Name": "Kapiti Line (Waikanae - Wellington)",
"Mode": "Train",
"Link": "/timetables/train/KPL"
}
},
{
"ServiceID": "KPL",
"IsRealtime": false,
"VehicleRef": null,
"Direction": "Inbound",
"OperatorRef": "RAIL",
"OriginStopID": "WAIK",
"OriginStopName": "WaikanaeStn",
"DestinationStopID": "WELL",
"DestinationStopName": "WELL-All stops",
"AimedArrival": "2020-10-15T20:35:00+13:00",
"AimedDeparture": "2020-10-15T20:35:00+13:00",
"VehicleFeature": null,
"DepartureStatus": null,
"ExpectedDeparture": null,
"DisplayDeparture": "2020-10-15T20:35:00+13:00",
"DisplayDepartureSeconds": 8283,
"Service": {
"Code": "KPL",
"TrimmedCode": "KPL",
"Name": "Kapiti Line (Waikanae - Wellington)",
"Mode": "Train",
"Link": "/timetables/train/KPL"
}
},
{
"ServiceID": "KPL",
"IsRealtime": false,
"VehicleRef": null,
"Direction": "Outbound",
"OperatorRef": "RAIL",
"OriginStopID": "WELL",
"OriginStopName": "WgtnStn",
"DestinationStopID": "WAIK",
"DestinationStopName": "WAIK-All stops",
"AimedArrival": "2020-10-15T20:39:00+13:00",
"AimedDeparture": "2020-10-15T20:39:00+13:00",
"VehicleFeature": null,
"DepartureStatus": null,
"ExpectedDeparture": null,
"DisplayDeparture": "2020-10-15T20:39:00+13:00",
"DisplayDepartureSeconds": 8523,
"Service": {
"Code": "KPL",
"TrimmedCode": "KPL",
"Name": "Kapiti Line (Waikanae - Wellington)",
"Mode": "Train",
"Link": "/timetables/train/KPL"
}
},
{
"ServiceID": "KPL",
"IsRealtime": false,
"VehicleRef": null,
"Direction": "Outbound",
"OperatorRef": "RAIL",
"OriginStopID": "WELL",
"OriginStopName": "WgtnStn",
"DestinationStopID": "WAIK",
"DestinationStopName": "WAIK-All stops",
"AimedArrival": "2020-10-15T21:09:00+13:00",
"AimedDeparture": "2020-10-15T21:09:00+13:00",
"VehicleFeature": null,
"DepartureStatus": null,
"ExpectedDeparture": null,
"DisplayDeparture": "2020-10-15T21:09:00+13:00",
"DisplayDepartureSeconds": 10323,
"Service": {
"Code": "KPL",
"TrimmedCode": "KPL",
"Name": "Kapiti Line (Waikanae - Wellington)",
"Mode": "Train",
"Link": "/timetables/train/KPL"
}
},
{
"ServiceID": "KPL",
"IsRealtime": false,
"VehicleRef": null,
"Direction": "Inbound",
"OperatorRef": "RAIL",
"OriginStopID": "WAIK",
"OriginStopName": "WaikanaeStn",
"DestinationStopID": "WELL",
"DestinationStopName": "WELL-All stops",
"AimedArrival": "2020-10-15T21:35:00+13:00",
"AimedDeparture": "2020-10-15T21:35:00+13:00",
"VehicleFeature": null,
"DepartureStatus": null,
"ExpectedDeparture": null,
"DisplayDeparture": "2020-10-15T21:35:00+13:00",
"DisplayDepartureSeconds": 11883,
"Service": {
"Code": "KPL",
"TrimmedCode": "KPL",
"Name": "Kapiti Line (Waikanae - Wellington)",
"Mode": "Train",
"Link": "/timetables/train/KPL"
}
},
{
"ServiceID": "KPL",
"IsRealtime": false,
"VehicleRef": null,
"Direction": "Outbound",
"OperatorRef": "RAIL",
"OriginStopID": "WELL",
"OriginStopName": "WgtnStn",
"DestinationStopID": "WAIK",
"DestinationStopName": "WAIK-All stops",
"AimedArrival": "2020-10-15T21:39:00+13:00",
"AimedDeparture": "2020-10-15T21:39:00+13:00",
"VehicleFeature": null,
"DepartureStatus": null,
"ExpectedDeparture": null,
"DisplayDeparture": "2020-10-15T21:39:00+13:00",
"DisplayDepartureSeconds": 12123,
"Service": {
"Code": "KPL",
"TrimmedCode": "KPL",
"Name": "Kapiti Line (Waikanae - Wellington)",
"Mode": "Train",
"Link": "/timetables/train/KPL"
}
},
{
"ServiceID": "KPL",
"IsRealtime": false,
"VehicleRef": null,
"Direction": "Outbound",
"OperatorRef": "RAIL",
"OriginStopID": "WELL",
"OriginStopName": "WgtnStn",
"DestinationStopID": "WAIK",
"DestinationStopName": "WAIK-All stops",
"AimedArrival": "2020-10-15T22:09:00+13:00",
"AimedDeparture": "2020-10-15T22:09:00+13:00",
"VehicleFeature": null,
"DepartureStatus": null,
"ExpectedDeparture": null,
"DisplayDeparture": "2020-10-15T22:09:00+13:00",
"DisplayDepartureSeconds": 13923,
"Service": {
"Code": "KPL",
"TrimmedCode": "KPL",
"Name": "Kapiti Line (Waikanae - Wellington)",
"Mode": "Train",
"Link": "/timetables/train/KPL"
}
},
{
"ServiceID": "KPL",
"IsRealtime": false,
"VehicleRef": null,
"Direction": "Inbound",
"OperatorRef": "RAIL",
"OriginStopID": "WAIK",
"OriginStopName": "WaikanaeStn",
"DestinationStopID": "WELL",
"DestinationStopName": "WELL-All stops",
"AimedArrival": "2020-10-15T22:35:00+13:00",
"AimedDeparture": "2020-10-15T22:35:00+13:00",
"VehicleFeature": null,
"DepartureStatus": null,
"ExpectedDeparture": null,
"DisplayDeparture": "2020-10-15T22:35:00+13:00",
"DisplayDepartureSeconds": 15483,
"Service": {
"Code": "KPL",
"TrimmedCode": "KPL",
"Name": "Kapiti Line (Waikanae - Wellington)",
"Mode": "Train",
"Link": "/timetables/train/KPL"
}
},
{
"ServiceID": "KPL",
"IsRealtime": false,
"VehicleRef": null,
"Direction": "Outbound",
"OperatorRef": "RAIL",
"OriginStopID": "WELL",
"OriginStopName": "WgtnStn",
"DestinationStopID": "WAIK",
"DestinationStopName": "WAIK-All stops",
"AimedArrival": "2020-10-15T22:39:00+13:00",
"AimedDeparture": "2020-10-15T22:39:00+13:00",
"VehicleFeature": null,
"DepartureStatus": null,
"ExpectedDeparture": null,
"DisplayDeparture": "2020-10-15T22:39:00+13:00",
"DisplayDepartureSeconds": 15723,
"Service": {
"Code": "KPL",
"TrimmedCode": "KPL",
"Name": "Kapiti Line (Waikanae - Wellington)",
"Mode": "Train",
"Link": "/timetables/train/KPL"
}
},
{
"ServiceID": "KPL",
"IsRealtime": false,
"VehicleRef": null,
"Direction": "Outbound",
"OperatorRef": "RAIL",
"OriginStopID": "WELL",
"OriginStopName": "WgtnStn",
"DestinationStopID": "WAIK",
"DestinationStopName": "WAIK-All stops",
"AimedArrival": "2020-10-15T23:09:00+13:00",
"AimedDeparture": "2020-10-15T23:09:00+13:00",
"VehicleFeature": null,
"DepartureStatus": null,
"ExpectedDeparture": null,
"DisplayDeparture": "2020-10-15T23:09:00+13:00",
"DisplayDepartureSeconds": 17523,
"Service": {
"Code": "KPL",
"TrimmedCode": "KPL",
"Name": "Kapiti Line (Waikanae - Wellington)",
"Mode": "Train",
"Link": "/timetables/train/KPL"
}
}
]
}
// 20201015181935
// https://www.metlink.org.nz/api/v1/StopDepartures/PARE
{
"LastModified": "2020-10-15T18:19:33+13:00",
"Stop": {
"Name": "Paremata Station",
"Sms": "PARE",
"Farezone": "6/5",
"Lat": -41.1063152,
"Long": 174.8662679,
"LastModified": "2020-10-15T00:02:11+13:00"
},
"Services": [
{
"ServiceID": "KPL",
"IsRealtime": true,
"VehicleRef": "4285",
"Direction": "Outbound",
"OperatorRef": "RAIL",
"OriginStopID": "WELL",
"OriginStopName": "WgtnStn",
"DestinationStopID": "WAIK",
"DestinationStopName": "WAIK-All stops",
"AimedArrival": "2020-10-15T18:39:00+13:00",
"AimedDeparture": "2020-10-15T18:39:00+13:00",
"VehicleFeature": null,
"DepartureStatus": "onTime",
"ExpectedDeparture": "2020-10-15T18:39:30+13:00",
"DisplayDeparture": "2020-10-15T18:39:30+13:00",
"DisplayDepartureSeconds": 1217,
"Service": {
"Code": "KPL",
"TrimmedCode": "KPL",
"Name": "Kapiti Line (Waikanae - Wellington)",
"Mode": "Train",
"Link": "/timetables/train/KPL"
}
},
{
"ServiceID": "KPL",
"IsRealtime": true,
"VehicleRef": "4295",
"Direction": "Outbound",
"OperatorRef": "RAIL",
"OriginStopID": "WELL",
"OriginStopName": "WgtnStn",
"DestinationStopID": "WAIK",
"DestinationStopName": "WAIK-All stops",
"AimedArrival": "2020-10-15T17:39:00+13:00",
"AimedDeparture": "2020-10-15T17:39:00+13:00",
"VehicleFeature": null,
"DepartureStatus": "delayed",
"ExpectedDeparture": "2020-10-15T18:39:33+13:00",
"DisplayDeparture": "2020-10-15T18:39:33+13:00",
"DisplayDepartureSeconds": 1220,
"Service": {
"Code": "KPL",
"TrimmedCode": "KPL",
"Name": "Kapiti Line (Waikanae - Wellington)",
"Mode": "Train",
"Link": "/timetables/train/KPL"
}
},
{
"ServiceID": "KPL",
"IsRealtime": true,
"VehicleRef": "4229",
"Direction": "Inbound",
"OperatorRef": "RAIL",
"OriginStopID": "WAIK",
"OriginStopName": "WaikanaeStn",
"DestinationStopID": "WELL",
"DestinationStopName": "WELL-All stops",
"AimedArrival": "2020-10-15T18:40:00+13:00",
"AimedDeparture": "2020-10-15T18:40:00+13:00",
"VehicleFeature": null,
"DepartureStatus": "onTime",
"ExpectedDeparture": "2020-10-15T18:40:00+13:00",
"DisplayDeparture": "2020-10-15T18:40:00+13:00",
"DisplayDepartureSeconds": 1247,
"Service": {
"Code": "KPL",
"TrimmedCode": "KPL",
"Name": "Kapiti Line (Waikanae - Wellington)",
"Mode": "Train",
"Link": "/timetables/train/KPL"
}
},
{
"ServiceID": "KPL",
"IsRealtime": false,
"VehicleRef": null,
"Direction": "Outbound",
"OperatorRef": "RAIL",
"OriginStopID": "WELL",
"OriginStopName": "WgtnStn",
"DestinationStopID": "WAIK",
"DestinationStopName": "WAIK-All stops",
"AimedArrival": "2020-10-15T19:09:00+13:00",
"AimedDeparture": "2020-10-15T19:09:00+13:00",
"VehicleFeature": null,
"DepartureStatus": null,
"ExpectedDeparture": null,
"DisplayDeparture": "2020-10-15T19:09:00+13:00",
"DisplayDepartureSeconds": 2987,
"Service": {
"Code": "KPL",
"TrimmedCode": "KPL",
"Name": "Kapiti Line (Waikanae - Wellington)",
"Mode": "Train",
"Link": "/timetables/train/KPL"
}
},
{
"ServiceID": "KPL",
"IsRealtime": false,
"VehicleRef": null,
"Direction": "Inbound",
"OperatorRef": "RAIL",
"OriginStopID": "WAIK",
"OriginStopName": "WaikanaeStn",
"DestinationStopID": "WELL",
"DestinationStopName": "WELL-All stops",
"AimedArrival": "2020-10-15T19:16:00+13:00",
"AimedDeparture": "2020-10-15T19:16:00+13:00",
"VehicleFeature": null,
"DepartureStatus": null,
"ExpectedDeparture": null,
"DisplayDeparture": "2020-10-15T19:16:00+13:00",
"DisplayDepartureSeconds": 3407,
"Service": {
"Code": "KPL",
"TrimmedCode": "KPL",
"Name": "Kapiti Line (Waikanae - Wellington)",
"Mode": "Train",
"Link": "/timetables/train/KPL"
}
},
{
"ServiceID": "KPL",
"IsRealtime": false,
"VehicleRef": null,
"Direction": "Inbound",
"OperatorRef": "RAIL",
"OriginStopID": "WAIK",
"OriginStopName": "WaikanaeStn",
"DestinationStopID": "WELL",
"DestinationStopName": "WELL-All stops",
"AimedArrival": "2020-10-15T19:35:00+13:00",
"AimedDeparture": "2020-10-15T19:35:00+13:00",
"VehicleFeature": null,
"DepartureStatus": null,
"ExpectedDeparture": null,
"DisplayDeparture": "2020-10-15T19:35:00+13:00",
"DisplayDepartureSeconds": 4547,
"Service": {
"Code": "KPL",
"TrimmedCode": "KPL",
"Name": "Kapiti Line (Waikanae - Wellington)",
"Mode": "Train",
"Link": "/timetables/train/KPL"
}
},
{
"ServiceID": "KPL",
"IsRealtime": false,
"VehicleRef": null,
"Direction": "Outbound",
"OperatorRef": "RAIL",
"OriginStopID": "WELL",
"OriginStopName": "WgtnStn",
"DestinationStopID": "WAIK",
"DestinationStopName": "WAIK-All stops",
"AimedArrival": "2020-10-15T19:39:00+13:00",
"AimedDeparture": "2020-10-15T19:39:00+13:00",
"VehicleFeature": null,
"DepartureStatus": null,
"ExpectedDeparture": null,
"DisplayDeparture": "2020-10-15T19:39:00+13:00",
"DisplayDepartureSeconds": 4787,
"Service": {
"Code": "KPL",
"TrimmedCode": "KPL",
"Name": "Kapiti Line (Waikanae - Wellington)",
"Mode": "Train",
"Link": "/timetables/train/KPL"
}
},
{
"ServiceID": "KPL",
"IsRealtime": false,
"VehicleRef": null,
"Direction": "Inbound",
"OperatorRef": "RAIL",
"OriginStopID": "WAIK",
"OriginStopName": "WaikanaeStn",
"DestinationStopID": "WELL",
"DestinationStopName": "WELL-All stops",
"AimedArrival": "2020-10-15T20:05:00+13:00",
"AimedDeparture": "2020-10-15T20:05:00+13:00",
"VehicleFeature": null,
"DepartureStatus": null,
"ExpectedDeparture": null,
"DisplayDeparture": "2020-10-15T20:05:00+13:00",
"DisplayDepartureSeconds": 6347,
"Service": {
"Code": "KPL",
"TrimmedCode": "KPL",
"Name": "Kapiti Line (Waikanae - Wellington)",
"Mode": "Train",
"Link": "/timetables/train/KPL"
}
},
{
"ServiceID": "KPL",
"IsRealtime": false,
"VehicleRef": null,
"Direction": "Outbound",
"OperatorRef": "RAIL",
"OriginStopID": "WELL",
"OriginStopName": "WgtnStn",
"DestinationStopID": "WAIK",
"DestinationStopName": "WAIK-All stops",
"AimedArrival": "2020-10-15T20:09:00+13:00",
"AimedDeparture": "2020-10-15T20:09:00+13:00",
"VehicleFeature": null,
"DepartureStatus": null,
"ExpectedDeparture": null,
"DisplayDeparture": "2020-10-15T20:09:00+13:00",
"DisplayDepartureSeconds": 6587,
"Service": {
"Code": "KPL",
"TrimmedCode": "KPL",
"Name": "Kapiti Line (Waikanae - Wellington)",
"Mode": "Train",
"Link": "/timetables/train/KPL"
}
},
{
"ServiceID": "KPL",
"IsRealtime": false,
"VehicleRef": null,
"Direction": "Inbound",
"OperatorRef": "RAIL",
"OriginStopID": "WAIK",
"OriginStopName": "WaikanaeStn",
"DestinationStopID": "WELL",
"DestinationStopName": "WELL-All stops",
"AimedArrival": "2020-10-15T20:35:00+13:00",
"AimedDeparture": "2020-10-15T20:35:00+13:00",
"VehicleFeature": null,
"DepartureStatus": null,
"ExpectedDeparture": null,
"DisplayDeparture": "2020-10-15T20:35:00+13:00",
"DisplayDepartureSeconds": 8147,
"Service": {
"Code": "KPL",
"TrimmedCode": "KPL",
"Name": "Kapiti Line (Waikanae - Wellington)",
"Mode": "Train",
"Link": "/timetables/train/KPL"
}
},
{
"ServiceID": "KPL",
"IsRealtime": false,
"VehicleRef": null,
"Direction": "Outbound",
"OperatorRef": "RAIL",
"OriginStopID": "WELL",
"OriginStopName": "WgtnStn",
"DestinationStopID": "WAIK",
"DestinationStopName": "WAIK-All stops",
"AimedArrival": "2020-10-15T20:39:00+13:00",
"AimedDeparture": "2020-10-15T20:39:00+13:00",
"VehicleFeature": null,
"DepartureStatus": null,
"ExpectedDeparture": null,
"DisplayDeparture": "2020-10-15T20:39:00+13:00",
"DisplayDepartureSeconds": 8387,
"Service": {
"Code": "KPL",
"TrimmedCode": "KPL",
"Name": "Kapiti Line (Waikanae - Wellington)",
"Mode": "Train",
"Link": "/timetables/train/KPL"
}
},
{
"ServiceID": "KPL",
"IsRealtime": false,
"VehicleRef": null,
"Direction": "Outbound",
"OperatorRef": "RAIL",
"OriginStopID": "WELL",
"OriginStopName": "WgtnStn",
"DestinationStopID": "WAIK",
"DestinationStopName": "WAIK-All stops",
"AimedArrival": "2020-10-15T21:09:00+13:00",
"AimedDeparture": "2020-10-15T21:09:00+13:00",
"VehicleFeature": null,
"DepartureStatus": null,
"ExpectedDeparture": null,
"DisplayDeparture": "2020-10-15T21:09:00+13:00",
"DisplayDepartureSeconds": 10187,
"Service": {
"Code": "KPL",
"TrimmedCode": "KPL",
"Name": "Kapiti Line (Waikanae - Wellington)",
"Mode": "Train",
"Link": "/timetables/train/KPL"
}
},
{
"ServiceID": "KPL",
"IsRealtime": false,
"VehicleRef": null,
"Direction": "Inbound",
"OperatorRef": "RAIL",
"OriginStopID": "WAIK",
"OriginStopName": "WaikanaeStn",
"DestinationStopID": "WELL",
"DestinationStopName": "WELL-All stops",
"AimedArrival": "2020-10-15T21:35:00+13:00",
"AimedDeparture": "2020-10-15T21:35:00+13:00",
"VehicleFeature": null,
"DepartureStatus": null,
"ExpectedDeparture": null,
"DisplayDeparture": "2020-10-15T21:35:00+13:00",
"DisplayDepartureSeconds": 11747,
"Service": {
"Code": "KPL",
"TrimmedCode": "KPL",
"Name": "Kapiti Line (Waikanae - Wellington)",
"Mode": "Train",
"Link": "/timetables/train/KPL"
}
},
{
"ServiceID": "KPL",
"IsRealtime": false,
"VehicleRef": null,
"Direction": "Outbound",
"OperatorRef": "RAIL",
"OriginStopID": "WELL",
"OriginStopName": "WgtnStn",
"DestinationStopID": "WAIK",
"DestinationStopName": "WAIK-All stops",
"AimedArrival": "2020-10-15T21:39:00+13:00",
"AimedDeparture": "2020-10-15T21:39:00+13:00",
"VehicleFeature": null,
"DepartureStatus": null,
"ExpectedDeparture": null,
"DisplayDeparture": "2020-10-15T21:39:00+13:00",
"DisplayDepartureSeconds": 11987,
"Service": {
"Code": "KPL",
"TrimmedCode": "KPL",
"Name": "Kapiti Line (Waikanae - Wellington)",
"Mode": "Train",
"Link": "/timetables/train/KPL"
}
},
{
"ServiceID": "KPL",
"IsRealtime": false,
"VehicleRef": null,
"Direction": "Outbound",
"OperatorRef": "RAIL",
"OriginStopID": "WELL",
"OriginStopName": "WgtnStn",
"DestinationStopID": "WAIK",
"DestinationStopName": "WAIK-All stops",
"AimedArrival": "2020-10-15T22:09:00+13:00",
"AimedDeparture": "2020-10-15T22:09:00+13:00",
"VehicleFeature": null,
"DepartureStatus": null,
"ExpectedDeparture": null,
"DisplayDeparture": "2020-10-15T22:09:00+13:00",
"DisplayDepartureSeconds": 13787,
"Service": {
"Code": "KPL",
"TrimmedCode": "KPL",
"Name": "Kapiti Line (Waikanae - Wellington)",
"Mode": "Train",
"Link": "/timetables/train/KPL"
}
},
{
"ServiceID": "KPL",
"IsRealtime": false,
"VehicleRef": null,
"Direction": "Inbound",
"OperatorRef": "RAIL",
"OriginStopID": "WAIK",
"OriginStopName": "WaikanaeStn",
"DestinationStopID": "WELL",
"DestinationStopName": "WELL-All stops",
"AimedArrival": "2020-10-15T22:35:00+13:00",
"AimedDeparture": "2020-10-15T22:35:00+13:00",
"VehicleFeature": null,
"DepartureStatus": null,
"ExpectedDeparture": null,
"DisplayDeparture": "2020-10-15T22:35:00+13:00",
"DisplayDepartureSeconds": 15347,
"Service": {
"Code": "KPL",
"TrimmedCode": "KPL",
"Name": "Kapiti Line (Waikanae - Wellington)",
"Mode": "Train",
"Link": "/timetables/train/KPL"
}
},
{
"ServiceID": "KPL",
"IsRealtime": false,
"VehicleRef": null,
"Direction": "Outbound",
"OperatorRef": "RAIL",
"OriginStopID": "WELL",
"OriginStopName": "WgtnStn",
"DestinationStopID": "WAIK",
"DestinationStopName": "WAIK-All stops",
"AimedArrival": "2020-10-15T22:39:00+13:00",
"AimedDeparture": "2020-10-15T22:39:00+13:00",
"VehicleFeature": null,
"DepartureStatus": null,
"ExpectedDeparture": null,
"DisplayDeparture": "2020-10-15T22:39:00+13:00",
"DisplayDepartureSeconds": 15587,
"Service": {
"Code": "KPL",
"TrimmedCode": "KPL",
"Name": "Kapiti Line (Waikanae - Wellington)",
"Mode": "Train",
"Link": "/timetables/train/KPL"
}
},
{
"ServiceID": "KPL",
"IsRealtime": false,
"VehicleRef": null,
"Direction": "Outbound",
"OperatorRef": "RAIL",
"OriginStopID": "WELL",
"OriginStopName": "WgtnStn",
"DestinationStopID": "WAIK",
"DestinationStopName": "WAIK-All stops",
"AimedArrival": "2020-10-15T23:09:00+13:00",
"AimedDeparture": "2020-10-15T23:09:00+13:00",
"VehicleFeature": null,
"DepartureStatus": null,
"ExpectedDeparture": null,
"DisplayDeparture": "2020-10-15T23:09:00+13:00",
"DisplayDepartureSeconds": 17387,
"Service": {
"Code": "KPL",
"TrimmedCode": "KPL",
"Name": "Kapiti Line (Waikanae - Wellington)",
"Mode": "Train",
"Link": "/timetables/train/KPL"
}
},
{
"ServiceID": "KPL",
"IsRealtime": false,
"VehicleRef": null,
"Direction": "Inbound",
"OperatorRef": "RAIL",
"OriginStopID": "WAIK",
"OriginStopName": "WaikanaeStn",
"DestinationStopID": "WELL",
"DestinationStopName": "WELL-All stops",
"AimedArrival": "2020-10-15T23:35:00+13:00",
"AimedDeparture": "2020-10-15T23:35:00+13:00",
"VehicleFeature": null,
"DepartureStatus": null,
"ExpectedDeparture": null,
"DisplayDeparture": "2020-10-15T23:35:00+13:00",
"DisplayDepartureSeconds": 18947,
"Service": {
"Code": "KPL",
"TrimmedCode": "KPL",
"Name": "Kapiti Line (Waikanae - Wellington)",
"Mode": "Train",
"Link": "/timetables/train/KPL"
}
},
{
"ServiceID": "KPL",
"IsRealtime": false,
"VehicleRef": null,
"Direction": "Outbound",
"OperatorRef": "RAIL",
"OriginStopID": "WELL",
"OriginStopName": "WgtnStn",
"DestinationStopID": "WAIK",
"DestinationStopName": "WAIK-All stops",
"AimedArrival": "2020-10-15T23:39:00+13:00",
"AimedDeparture": "2020-10-15T23:39:00+13:00",
"VehicleFeature": null,
"DepartureStatus": null,
"ExpectedDeparture": null,
"DisplayDeparture": "2020-10-15T23:39:00+13:00",
"DisplayDepartureSeconds": 19187,
"Service": {
"Code": "KPL",
"TrimmedCode": "KPL",
"Name": "Kapiti Line (Waikanae - Wellington)",
"Mode": "Train",
"Link": "/timetables/train/KPL"
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment