auckland-transport
TypeScript icon, indicating that this package has built-in type declarations

2.0.1 • Public • Published

auckland-transport

A simplified interface for the Auckland Transport API.

Install

npm install auckland-transport

Usage

import aucklandTransport from 'auckland-transport';

const [{route_short_name, route_long_name}] = await aucklandTransport('gtfs/routes/geosearch', {
	apiKey: 'some api key',
	data: {
		lat: -36.8483957,
		lng: 174.7600113,
		distance: 100,
	},
});

console.log(`Bus ${route_short_name} - ${route_long_name}`);

API

aucklandTransport(method, options)

method

Type: string

The API method to call.

options

Type: object

apiKey

Type: string

The API key to use.

data

Type: object
Default: {}

The options to pass to the API.

/auckland-transport/

    Package Sidebar

    Install

    npm i auckland-transport

    Weekly Downloads

    1

    Version

    2.0.1

    License

    MIT

    Unpacked Size

    4.22 kB

    Total Files

    6

    Last publish

    Collaborators

    • richienb