2 points · by jsingleton · 11y ago · 1 comment
You could also try pasting this into the browser console:
var r = new XMLHttpRequest();
r.open("GET", "https://huxley.apphb.com/all/pad/from/rdg/1?accessToken=DA1C7740-9DA0-11E4-80E6-A920340000B1", true);
r.onreadystatechange = function () {
if (r.readyState != 4 || r.status != 200) return;
var resp = JSON.parse(r.response);
if (resp.trainServices && resp.trainServices.length > 0) {
alert("The next train to arrive at " + resp.locationName + " from " + resp.filterLocationName + " is scheduled to get in at " + resp.trainServices[0].sta);
} else {
alert("Sorry, no trains from " + resp.filterLocationName + " arriving soon");
}
};
r.send();