Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nzta_traffic

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nzta_traffic

module to make calls to nzta traffic api for travel times

  • 0.1.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

NZTA TRAFFIC MODULE

There are two ways to use this module:

  1. Normal node module in an app
  2. As command line tool

####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
  2. set up config/nztaConfig.json as per the nztaConfigjson.example

call getTravelTime("journe_ref") any where in you node app! AKL-SH1-NB-RNM is an example journey ref.

So for example: getTravelTime("AKL-SH1-NB-RNM");

it will return json: { name: 'AKL-SH1-NB-RNM', averageSpeed: '84.34', minutes: '35', pollDateTime: '2014-11-12T21:54:13.227+13:00' }

To install for #2:

  1. npm install nzta_traffic
  2. set up nztaConfig.json as per the nztaConfigjson.example

Then NODE_ENV=test node traffic.js AKL-SH1-NB-RNM and it will log the json above to console

Keywords

FAQs

Package last updated on 12 Nov 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc