Skip to content

felixyeungdev/hk-nextbus

Repository files navigation

Next Bus (Hong Kong)

Non-official Node.JS wrapper for Next Bus

Resources

Getting Started

Install

npm install hk-nextbus

Usage

import { NextBus } from 'hk-nextbus';
// or
const { NextBus } = require('hk-nextbus');

const company_id = 'CTB';
const route = '1';
const direction = 'outbound';
const stop_id = '002737';
const { data: companyData } = await NextBus.getCompany({ company_id });
const { data: routesData } = await NextBus.getAllRoutes({ company_id });
const { data: routeData } = await NextBus.getRoute({ company_id, route });
const { data: routeStopData } = await NextBus.getRouteStop({ company_id, route, direction });
const { data: etaData } = await NextBus.getETA({ company_id, stop_id, route });

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published