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

aata

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aata

Node wrapper around AATA API

  • 1.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
7
Maintainers
1
Weekly downloads
 
Created
Source

nodejs module for accessing the AATA MicroAPI.

Build Status npm version

Install

npm install --save aata

Usage

Please accept AATA terms of use

var AATA = require('aata');

var aata = new AATA();

// Thin wrapper on top of existing AATA MicroAPI: http://www.theride.org/AboutUs/Developer-Resources/Developer-Files
// Note: All methods accept a route id, which as expected, will return data for only that route.

// Get schedule documents
aata.getScheduleDocuments()
  .then(function(data) {
    console.log(data);
  })
  .catch(function(err) {
    console.error(err);
  });

// Get all stops in the system
aata.getStopsOnRoute()
  .then(function(data) {
    console.log(data);
  })
  .catch(function(err) {
    console.error(err);
  });

// Get timepoints for stops in the system
aata.getStopTimepoints()
  .then(function(data) {
    console.log(data);
  })
  .catch(function(err) {
    console.error(err);
  });

// Get names and IDs for all AATA routes
aata.getRouteNames()
  .then(function(data) {
    console.log(data);
  })
  .catch(function(err) {
    console.error(err);
  });

// Get names and IDs for all AATA routes
aata.getBusLocations()
  .then(function(data) {
    console.log(data);
  })
  .catch(function(err) {
    console.error(err);
  });

// You can use callbacks rather than promises too.
aata.getRouteNames(null, function(err, data) {
  if (err) return console.error(error);
  console.log(data);
});

Test

npm test

License

MIT: https://opensource.org/licenses/MIT

Keywords

FAQs

Package last updated on 21 Feb 2016

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