Skip to content

Conversation

@wisc-gmv
Copy link
Contributor

@wisc-gmv wisc-gmv commented May 22, 2025

You can now do the following

const stops = api
  .customer(code)
  .stops()
  .include('patternHrefs') // Get href list of patterns that use this stop
  .getPage()
  .then(stops => /* stops now have .patternHrefs (string[]) that use the stop) */);

This lets you figure out what pattern the stop is associated to without getting patterns which returns an href of the stop with the pattern in the stop href instead of the direct stop href. This may allow O(1) searches on the client for patterns related to a stop (if patterns are in a hashmap) instead of iterating through stop arrays in each pattern.

Cooper Scott added 3 commits May 16, 2025 09:40
* add .include to stopsContext
* add { include: string } option to stop .fetch()
* add tests in get_stops.test.js
* update readme to use development tag
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants