UNPKG

@hasadna/open-bus-api-client

Version:

A client library for interacting with the Open-Bus API.

52 lines (38 loc) β€’ 1.84 kB
# 🚌 Open Bus API Client A TypeScript client library for interacting with the Open-Bus API. ## πŸ“’ Get Involved - πŸ’¬ For general help and system updates, join the Hasadna Slack: [#open-bus channel](https://join.slack.com/t/hasadna/shared_invite/zt-167h764cg-J18ZcY1odoitq978IyMMig) - 🐞 Found a bug or have a feature request? [Open an issue](https://github.com/hasadna/open-bus-map-search/issues/new) - 🀝 Want to contribute? See our [contributing guidelines](https://github.com/hasadna/open-bus-pipelines/blob/main/CONTRIBUTING.md) ## πŸ”— Related Projects - [πŸ—ΊοΈ Open Bus Map Search (Client App)](https://github.com/hasadna/open-bus-map-search) - [Live Website](https://open-bus-map-search.hasadna.org.il/dashboard) - [πŸ“¦ Open Bus API Client (API Package Generator)](https://github.com/hasadna/open-bus-api-client) - [🌐 Open Bus Stride API (REST)](https://github.com/hasadna/open-bus-stride-api) – [API Docs](https://open-bus-stride-api.hasadna.org.il/docs) - [🌐 Open Bus Backend (REST)](https://github.com/hasadna/open-bus-backend) – [API Docs](https://open-bus-backend.k8s.hasadna.org.il/docs) ## πŸ“¦ Installation ```bash npm install @hasadna/open-bus-api-client ```` ## πŸ”§ Usage ```ts 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); ```