Skip to content

Instantly share code, notes, and snippets.

@emma-k-alexandra
Created October 12, 2022 22:21
Show Gist options
  • Save emma-k-alexandra/44999b75b8f0107be7743ec800f3bdea to your computer and use it in GitHub Desktop.
Save emma-k-alexandra/44999b75b8f0107be7743ec800f3bdea to your computer and use it in GitHub Desktop.
Trains to New Carrollton return `null` `DestinationCode` from GetPredictions JSON endpoint in WMATA API
GET https://api.wmata.com/StationPrediction.svc/json/GetPrediction/K06 HTTP/1.1
Host: api.wmata.com
api_key: API_KEY_HERE
Pragma: no-cache
Arr-Disable-Session-Affinity: True
Cache-Control: no-store, must-revalidate, no-cache
Date: Wed, 12 Oct 2022 22:18:37 GMT
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Content-Length: 989
Content-Type: application/json; charset=utf-8
Expires: Wed, 12 Oct 2022 22:18:37 GMT
{
"Trains": [{
"Car": "6",
"Destination": "Vienna",
"DestinationCode": "K08",
"DestinationName": "Vienna/Fairfax-GMU",
"Group": "2",
"Line": "OR",
"LocationCode": "K06",
"LocationName": "West Falls Church-VT/UVA",
"Min": "1"
}, {
"Car": "6",
"Destination": "Vienna",
"DestinationCode": "K08",
"DestinationName": "Vienna/Fairfax-GMU",
"Group": "2",
"Line": "OR",
"LocationCode": "K06",
"LocationName": "West Falls Church-VT/UVA",
"Min": "17"
}, {
"Car": "6",
"Destination": "N Carrollton",
"DestinationCode": null,
"DestinationName": "N Carrollton",
"Group": "1",
"Line": "OR",
"LocationCode": "K06",
"LocationName": "West Falls Church-VT/UVA",
"Min": "21"
}, {
"Car": "6",
"Destination": "Vienna",
"DestinationCode": "K08",
"DestinationName": "Vienna/Fairfax-GMU",
"Group": "2",
"Line": "OR",
"LocationCode": "K06",
"LocationName": "West Falls Church-VT/UVA",
"Min": "30"
}, {
"Car": "-",
"Destination": "N Carrollton",
"DestinationCode": null,
"DestinationName": "N Carrollton",
"Group": "1",
"Line": "OR",
"LocationCode": "K06",
"LocationName": "West Falls Church-VT/UVA",
"Min": "36"
}]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment