Skip to content

hacked together page to display bus arrival times from the SBMTD/Clever Devices API

License

Notifications You must be signed in to change notification settings

oranv/busclock-public

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

busclock-public

hacked together page to display bus arrival times from the SBMTD/Clever Devices API

You will need:

  • a web host that supports PHP (for the proxy)
  • an API key from SBMTD (create an account on BusTracker and request one) or similar agency
  • API PATH for SBMTD or other agency

What it does:

  • busclock.js grabs predictions for one or more stops via API as JSON, formats them, and inserts then into the page
    • dictionary defines text replacement
    • STOPS defines default stop ids to display
    • PRESETS defines sets of stops that can be passed as a parameter like "busclock.html?preset=cremona"
  • busclock.html is where formatted predictions are displayed
  • busclock.css defines basic styling and colors for routes
  • API requests and responses are proxied to get around browser cross domain restrictions

About

hacked together page to display bus arrival times from the SBMTD/Clever Devices API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages