Verifies that the data for favourites is coherent and current and fixes errors
stopStationMap
favourites
Set you Relay environment
-
environment
any Your Relay environment
Get alerts for modes
Returns Stop and station objects .
-
favourites
any
Returns Stop and station objects filtered by given mode based on mode information acquired from OTP by checking the modes of the departures on the given stops.
-
stopsToFilter
any -
mode
String
Returns Favourite Route objects depending on input
-
favourites
any -
input
String Search text, if empty no objects are returned -
transportMode
String If provided, all returned route objects are of this mode, e.g. 'BUS' -
pathOpts
an object containing two properties routesPrefix and stopsPrefix to override the URL paths returned by this method
Returns Favourite VehicleRentalStation objects depending on input
-
favourites
any -
input
String Search text, if empty no objects are returned
Returns Route objects depending on input
-
input
String Search text, if empty no objects are returned -
feedIds
any -
transportMode
String Filter routes with a transport mode, e.g. route-BUS -
pathOpts
an object containing two properties routesPrefix and stopsPrefix to override the URL paths returned by this method
Can be used to filter stops and stations by a given mode
-
results
any search results from geocoding -
mode
any e.g 'BUS' or 'TRAM' -
type
any type of search results to filter, e.g 'Stops' or 'Routes'. This function only filters Stops because routes can be filtered with the query itself (optional, default'Stops'
)
This module is part of the Digitransit-ui project. It is maintained in the HSLdevcom/digitransit-ui repository, where you can create PRs and issues.
Install this module individually:
$ npm install @digitransit-search-util/digitransit-search-util-query-utils
Or install the digitransit-search-util module that includes it as a function:
$ npm install @digitransit-search-util/digitransit-search-util