0.0.2 • Published 10 years ago

transport-api v0.0.2

Weekly downloads
2
License
-
Repository
github
Last release
10 years ago

#TransportAPI A basic warapper around TransportAPI (http://transportapi.com/)

How to use it:

Install TransportAPI

npm install transport-api

Require TransposrtAPI

var TransportAPI = require('TransportAPI');

Instantiate an instance of TransposrtAPI. You'll need to provide options specifying your forecast.io API Key and API ID.

var options = {
  APIID: process.env.TransportAPI_API_ID,
  APIKey: process.env.TransportAPI_API_KEY 
},
transportapi = new TransportAPI(options);

Make a call to the API using the LiveBusDepartures.

The LiveBusDepartures function calls to the http://transportapi.com/v3/uk/bus/stop/{atcocode}/live[.format]?{group=} endpoint.

transportapi.LiveBusDepartures(atcocode, function (err, res, data) {
  if (err) throw err;
  log('res: ' + util.inspect(res));
  log('data: ' + util.inspect(data));
});
0.0.2

10 years ago

0.0.1

11 years ago