A simplified interface for the Auckland Transport API.
npm install auckland-transport
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}`);
Type: string
The API method to call.
Type: object
Type: string
The API key to use.
Type: object
Default: {}
The options to pass to the API.