Skip to content
This repository has been archived by the owner on Jul 16, 2020. It is now read-only.

API Wishlist

W. Blaine Price edited this page Nov 12, 2015 · 11 revisions

Schema

Stop

{
  "stop_name": "MACARTHUR SQUARE",
  "stop_id": "8004",
  "stop_position": {
    "lat": "-78.000",
    "lon": "32"
  },
  "buses": [
    ... {buses} ...
  ]
}

Bus

{
  "route": "300",
  "destination": "SEABOARD & LIBERTY",
  "scheduled_time_of_arrival": <datestamp>
  "time_to_arrival": "11",
  "bus_id": "0123",
  "direction": 0,
  "last_known_position": {
    "lat": "-78.234",
    "lon": "32.000",
    "adherence": 3535
  }
}

API Calls

GET /stop/1337 Gets buses scheduled to arrive at stop 1337

[
  {
    "stop_name": "MACARTHUR SQUARE",
    "stop_id": "8004",
    "stop_position": {
      "lat": "-78.000",
      "lon": "32"'
    },
    "buses": [
      {
        "route": "300",
        "destination": "SEABOARD & LIBERTY",
        "scheduled_time_of_arrival": <datestamp>
        "time_to_arrival": "11",
        "bus_number": "0123",
        "last_known_position": {
          "lat": "-78.234",
          "lon": "32.000",
          "adherence": 2342
        }
      }
      ...
    ]
  }
]

GET /stop?lat=-78&lon=32&limit=3 Returns a list of limit Stops nearby the point.

[
  {
    "stop_name": "MACARTHUR SQUARE",
    "stop_id": "8004",
    "stop_position": {
      "lat": "-78.000",
      "lon": "32"'
    },
    "buses": [
      {
        "route": "300",
        "destination": "SEABOARD & LIBERTY",
        "scheduled_time_of_arrival": <datestamp>
        "time_to_arrival": "11",
        "bus_number": "0123",
        "last_known_position": {
          "lat": "-78.234",
          "lon": "32.000",
          "adherence": 2333
        }
      }
      ...
    ]
  },
  ... 
]

GET /route/42

GET /route

Clone this wiki locally