Skip to content

Commit

Permalink
use faplino server for eduroam
Browse files Browse the repository at this point in the history
  • Loading branch information
ronhippler committed Mar 3, 2016
1 parent 64b332e commit 715ddbc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 4 additions & 1 deletion lib/find.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,15 @@
var requestP = require('request-promise');
var utils = require('./utils');

var url = process.env.EDUROAM != undefined ? 'http://efa.faplino.de/dvb/XML_STOPFINDER_REQUEST' : 'http://efa.vvo-online.de:8080/dvb/XML_STOPFINDER_REQUEST';


var find = function find(searchString, callback) {
searchString = utils.stripSpaces(searchString);

// for coordinates see this as well: http://data.linz.gv.at/katalog/linz_ag/linz_ag_linien/fahrplan/LINZ_AG_LINIEN_Schnittstelle_EFA_Koordinaten.pdf
var options = {
url: 'http://efa.vvo-online.de:8080/dvb/XML_STOPFINDER_REQUEST',
url: url,
qs: {
locationServerActive: 1,
outputFormat: 'JSON',
Expand Down
4 changes: 3 additions & 1 deletion lib/route.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
var requestP = require('request-promise');
var utils = require('./utils');

var url = process.env.EDUROAM != undefined ? 'http://efa.faplino.de/dvb/XML_TRIP_REQUEST2' : 'http://efa.vvo-online.de:8080/dvb/XML_TRIP_REQUEST2';

var route = function route(origin, destination, time, deparr, callback) {
origin = utils.stripSpaces(origin);
destination = utils.stripSpaces(destination);
Expand All @@ -24,7 +26,7 @@ var route = function route(origin, destination, time, deparr, callback) {
// API docs: http://data.linz.gv.at/katalog/linz_ag/linz_ag_linien/fahrplan/LINZ_LINIEN_Schnittstelle_EFA_V1.pdf
// found here -> http://www.nise81.com/archives/2674
var options = {
url: 'http://efa.vvo-online.de:8080/dvb/XML_TRIP_REQUEST2',
url: url,
qs: {
sessionID: '0',
requestID: '0',
Expand Down

0 comments on commit 715ddbc

Please sign in to comment.