Skip to content
Snippets Groups Projects

Added timetable-method

Merged Bayarbileg Batbileg requested to merge timetable-method into master
All threads resolved!
Files
2
+ 23
3
@@ -2,7 +2,7 @@ const express = require('express');
const mysql = require('mysql');
const socketIO = require('socket.io');
const http = require('http');
const timetable = require('./timetable-method');
const geo = require('./geoUtils');
if (process.env.NODE_ENV !== 'production' && process.env.NODE_ENV !== 'gitlab') {
@@ -205,7 +205,27 @@ getNewUserId = () => {
}
// getTimetables = ( physicalStopCode, lineCode, DestinationCode, stopCode ) => {
// console.log(`Getting timetable for \n line : ${lineCode} \n destination : ${DestinationCode} \n from : ${physicalStopCode}`);
// return new Promise((resolve,reject) => {
// timetable.getDepartureCode(physicalStopCode,lineCode,DestinationCode,stopCode).then(response =>{
// //console.log(`departurecode > ${response}`); // to see departureCode
// timetable.getThermometer(response).then(resp =>{
// //console.log(resp); //see timetable for a specific line, direction and a starting stop
// resolve(resp);
// }).catch(err =>{
// reject(err);
// })
// }).catch(err =>{
// reject(err);
// })
// });
// }
// Example of use of getTimetabless
// getTimetables('WTC00', '10', 'RIVE', 'WTC0' ).then(function(data){
// console.log(data);
// })
Loading