-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlocalDev.js
53 lines (45 loc) · 1.15 KB
/
localDev.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
require('dotenv').config();
var busTracker = require('./myBusTracker.js');
/***
*
* Testing
*
* */
//for local testing
var options = {
// // // a list of up to 10 stop IDs
// stopIds: [ "3766" ],
// // topCount is optional
// topCount: 5
BusRouteNumber: 'J14',
RouteDirection: 'North',
BusStopName: 'Balbo and Columbus',
BusRouteName: ''
};
// busTracker.getStopSchedule(options)
// .then(busTracker.renderBusText);
// busTracker.getRouteNumber(options)
// .then(function(val){
// console.log(val);
// });
busTracker.getRouteNumber(options)
.then(busTracker.getRouteDirections)
.then(busTracker.getRouteStop)
//getRouteStop(options)
.then(busTracker.getStopSchedule)
// .then(function(val){
// console.log(renderBusText(val));
// })
.catch(busTracker.errorHandler)
.then(busTracker.renderBusText);
// for local testing
// getRouteSchedule(options).then(function(val){
// console.log('val final: ', val);
// })
// .catch(function(err){
// console.log('err: ', err);
// });
// var stop = _.filter(routeObj, function (r) {
// return r.rtnm.toLowerCase() === 'hyde park express';
// });
// console.log(stop);