Skip to content

Instantly share code, notes, and snippets.

@elee
Created December 7, 2013 23:41
Show Gist options
  • Save elee/7851416 to your computer and use it in GitHub Desktop.
Save elee/7851416 to your computer and use it in GitHub Desktop.
NextBus API Hilarity
$ curl "http://webservices.nextbus.com/service/publicXMLFeed?command=predictions&a=emery&stopId=5300&routeTag=Hollis"
<?xml version="1.0" encoding="utf-8" ?>
<body copyright="All data copyright Emery-Go-Round 2013.">
<predictions agencyTitle="Emery-Go-Round" routeTitle="Hollis" routeTag="Hollis" stopTitle="MacArthur BART Station" stopTag="bart_o" dirTitleBecauseNoPredictions="to Emeryville">
<message text="Nextbus time will not be accurate due to new vehicles on the road with out the Nextbus equipment. Feel free to call the office at 510-451-3862"/>
</predictions>
</body>
$ : I mean, who doesn't want to make an api call that gives you a phone number to call in an attribute called "text" of a message element
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment