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

metro-info

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

metro-info

Christchurch (Unofficial) MetroInfo API NodeJS library

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

metro-info

Build Status code style: prettier

🚌 Simplified interaction with Christchurch's Metro Info bus service

Install

npm install metro-info

Usage

Getting times for a specific Platform can be achieved as per the example below.

import { getPlatformTimes, PlatformTimes } from 'metro-info';

async function getTimes(): void {
  const platformTimes: PlatformTimes = await getPlatformTimes(1205);
}

If you're unsure of a Platform number, they can be found on the physical stops themselves or alternatively a complete collection of all Platforms with their locations, tags, and various other information can be obtained as per the example below.

import { getPlatformLocations, PlatformLocations } from 'metro-info';

async function getLocations(): void {
  const platformLocations: PlatformLocations = await getPlatformLocations();
}

Models

The models closely resemble those as exposed by the Connexionz API. The schema documentation was incredibly verbose, I have omitted commenting many items as a lot of the schema documentation simply reiterated the property name.

Issues

If you encounter a case where an exception is thrown while parsing the XML response, please raise an issue including the XML that caused the failure and I will investigate the cause.

TODO

  • Testing of the mappers.
  • Explore other schema types to expose from the official MetroInfo API.

Keywords

FAQs

Package last updated on 22 Jan 2019

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