k5cents / metro

Get DC transit data as R data frames
https://k5cents.github.io/metro/
GNU General Public License v3.0
4 stars 0 forks source link

API does not return station times #15

Open k5cents opened 11 months ago

k5cents commented 11 months ago

Docs: https://developer.wmata.com/docs/services/5476364f031f590f38092507/operations/5476364f031f5909e4fe3312

Code:

dat <- wmata_api(
  path = "Rail.svc/json/jStationTimes",
  query = list(StationCode = "A01"),
  level = 1,
  api_key = api_key
)

The FirstTrains and LastTrains values are empty.

{
  "StationTimes": [
    {
      "Code": "E10",
      "StationName": "Greenbelt",
      "Monday": {
        "OpeningTime": "04:50",
        "FirstTrains": [],
        "LastTrains": []
      },
      "Tuesday": {
        "OpeningTime": "04:50",
        "FirstTrains": [],
        "LastTrains": []
      },
      "Wednesday": {
        "OpeningTime": "04:50",
        "FirstTrains": [],
        "LastTrains": []
      },
      "Thursday": {
        "OpeningTime": "04:50",
        "FirstTrains": [],
        "LastTrains": []
      },
      "Friday": {
        "OpeningTime": "04:50",
        "FirstTrains": [],
        "LastTrains": []
      },
      "Saturday": {
        "OpeningTime": "06:50",
        "FirstTrains": [],
        "LastTrains": []
      },
      "Sunday": {
        "OpeningTime": "07:50",
        "FirstTrains": [],
        "LastTrains": []
      }
    }
  ]
}