A TypeScript client library for interacting with the Open-Bus API.
- 💬 For general help and system updates, join the Hasadna Slack: #open-bus channel
- 🐞 Found a bug or have a feature request? Open an issue
- 🤝 Want to contribute? See our contributing guidelines
- 🗺️ Open Bus Map Search (Client App) - Live Website
- 🌐 Open Bus Stride API (REST) – API Docs
- 🌐 Open Bus Backend (REST) – API Docs
- 📦 NPM Package
# Instal Genetae Depencdy
npm install
# Instal NPM Package
npm install @hasadna/open-bus-api-client
Before publishing, ensure the NODE_AUTH_TOKEN
environment variable is set.
This is required to authenticate with the npm registry.
# 1. Download the latest OpenAPI schema
npm run download
# 2. Generate the client code from OpenAPI spec
npm run generate
# 3. Publish the package to npm
npm run publish
⚠️ NODE_AUTH_TOKEN
must be available in your environment (e.g.,.env
, terminal, or CI/CD pipeline).
import {
AggregationsApi,
ComplaintsApi,
GovernmentTransportationApi,
GtfsApi,
HealthApi,
IssuesApi,
SiriApi,
} from "@hasadna/open-bus-api-client";
// URL: https://open-bus-stride-api.hasadna.org.il
const Aggregations = AggregationsApi("URL");
const Gtfs = GtfsApi("URL");
const Siri = SiriApi("URL");
// URL: https://open-bus-backend.k8s.hasadna.org.il
const Health = HealthApi("URL");
const Issues = IssuesApi("URL");
const Complaints = ComplaintsApi("URL");
const GovernmentTransportation = GovernmentTransportationApi("URL");
const stops = await Gtfs.getBusStops();
console.log(stops);
.
├── client/ # Generated client code
├── openapi-templates/ # README templets
├── scripts/ # Custom JS scripts
├── config.json # Open-API generator config
├── openapi-merge.json # Open-API merge cli config
├── openapitools.json # Open-API generator cli config
└── package.json # NPM config