JSPM

@hasadna/open-bus-api-client

1.2.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 51
  • Score
    100M100P100Q90295F
  • License MIT

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

Package Exports

  • @hasadna/open-bus-api-client
  • @hasadna/open-bus-api-client/dist/esm/index.js
  • @hasadna/open-bus-api-client/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@hasadna/open-bus-api-client) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

🚌 Open Bus API Client

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

πŸ“’ Get Involved

πŸ“¦ Installation

npm install @hasadna/open-bus-api-client

πŸ”§ Usage

import {
  AggregationsApi,
  ComplaintsApi,
  Configuration,
  GovernmentTransportationApi,
  GtfsApi,
  HealthApi,
  IssuesApi,
  SiriApi,
  UserCasesApi,
} from '@hasadna/open-bus-api-client'

// URL: https://open-bus-stride-api.hasadna.org.il
export const STRIDE_API_BASE_PATH = process.env.VITE_STRIDE_API
const STRIDE_API_CONFIG = new Configuration({ basePath: STRIDE_API_BASE_PATH })

export const AGGREGATIONS_API = new AggregationsApi(STRIDE_API_CONFIG)
export const GTFS_API = new GtfsApi(STRIDE_API_CONFIG)
export const SIRI_API = new SiriApi(STRIDE_API_CONFIG)
export const USER_CASE_API = new UserCasesApi(STRIDE_API_CONFIG)

// URL: https://open-bus-backend.k8s.hasadna.org.il
const BACKEND_API_BASE_PATH = process.env.VITE_BACKEND_API
const BACKEND_API_CONFIG = new Configuration({ basePath: BACKEND_API_BASE_PATH })

export const HEALTH_API = new HealthApi(BACKEND_API_CONFIG)
export const ISSUES_API = new IssuesApi(BACKEND_API_CONFIG)
export const COMPLAINTS_API = new ComplaintsApi(BACKEND_API_CONFIG)
export const GOVERNMENT_TRANSPORTATION_API = new GovernmentTransportationApi(BACKEND_API_CONFIG)

const stops = await GTFS_API.gtfsRideStopsListGet(...)

console.log(stops);