hk-bus-eta 2.1.1 → 2.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  Bus ETAs in Hong Kong is now available as open data in Hong Kong, while there is no format normalization across different transport provider. This package is a js package (typescript supported) for querying normalized public traffic ETA (Estimated Time of Arrival) in Hong Kong. The ETA data structure is based on [hkbus/hk-bus-crawling](https://github.com/hkbus/hk-bus-crawling) and a well-established open-source project is known as [hkbus.app](https://hkbus.app/).
4
4
 
5
+ A Python version package is available [here](https://pypi.org/project/hk-bus-eta/) and the source code is available [here](https://github.com/hkbus/hk-bus-crawling).
6
+
5
7
  ## Demo
6
8
 
7
9
  Live demo is available [here](https://hk-bus-eta.chunlaw.io/).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hk-bus-eta",
3
- "version": "2.1.1",
3
+ "version": "2.1.2",
4
4
  "description": "Query the ETA (Estimated Time of Arrival) of HK Bus/Minibus/MTR/Lightrail",
5
5
  "main": "dist/index.js",
6
6
  "module": "esm/index.js",
package/src/index.ts CHANGED
@@ -21,16 +21,16 @@ export async function fetchEtas ( {route, stops, bound, dest, seq, serviceType,
21
21
  route,
22
22
  stopId: stops.kmb[seq],
23
23
  seq, co,
24
- serviceType, bound: bound[company_id],
24
+ serviceType, bound: bound.kmb,
25
25
  }))
26
26
  } else if ( company_id === 'ctb' && stops.ctb ) {
27
- _etas = _etas.concat( await ctb({stopId: stops.ctb[seq], route, bound: bound[company_id], seq }))
27
+ _etas = _etas.concat( await ctb({stopId: stops.ctb[seq], route, bound: bound.ctb, seq }))
28
28
  } else if ( company_id === 'nlb' && stops.nlb ) {
29
29
  _etas = _etas.concat( await nlb({stopId: stops.nlb[seq], nlbId}) )
30
30
  } else if ( company_id === 'lrtfeeder' && stops.lrtfeeder ) {
31
31
  _etas = _etas.concat( await lrtfeeder({stopId: stops.lrtfeeder[seq], route, language}))
32
32
  } else if ( company_id === 'gmb' && stops.gmb ) {
33
- _etas = _etas.concat( await gmb({stopId: stops.gmb[seq], gtfsId, seq, bound: bound[company_id]}) )
33
+ _etas = _etas.concat( await gmb({stopId: stops.gmb[seq], gtfsId, seq, bound: bound.gmb }) )
34
34
  } else if ( company_id === 'lightRail' && stops.lightRail ) {
35
35
  _etas = _etas.concat( await lightrail({ stopId: stops.lightRail[seq], route, dest }) )
36
36
  } else if ( company_id === 'mtr' && stops.mtr ) {