nzta_traffic
Advanced tools
Comparing version 0.1.2 to 0.1.3
{ | ||
"name": "nzta_traffic", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"description": "module to make calls to nzta traffic api for travel times", | ||
@@ -5,0 +5,0 @@ "main": "./traffic.js", |
@@ -8,4 +8,7 @@ NZTA TRAFFIC MODULE | ||
###To install for #1: | ||
####Make sure you have api access: | ||
https://infoconnect.highwayinfo.govt.nz/opencms/opencms/InfoConnect/for-developers/index.html | ||
### To install for #1: | ||
1. npm install nzta_traffic | ||
@@ -25,3 +28,3 @@ 2. set up config/nztaConfig.json as per the nztaConfigjson.example | ||
### To install for #2: | ||
### To install for #2: | ||
@@ -28,0 +31,0 @@ 1. npm install nzta_traffic |
var https = require('https'), | ||
xml2js = require('xml2js'); | ||
//TODO: better way to absolute path the config | ||
if(process.env.NODE_ENV !== "test") | ||
@@ -51,2 +51,4 @@ { | ||
console.log('response end.'); | ||
//TODO:convert to promises | ||
try { | ||
@@ -85,4 +87,3 @@ xml2js.parseString(nztaData, function(err, result) { | ||
} | ||
//getData(); | ||
module.exports.getTravelTime = getTravelTime; |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4513
68
32