TripSearchResultSegment

TripSearchResultSegment

Trip Search Result Segment

This Class represents a single Trip Search Result Segment. One or more of these makes a Trip Search Result.

A Trip Search Result Segment is an individual Trip that a rider would take on their way from their original Origin and Destination Stops. A single Segment may not necessarily contain either the original Origin or final Destination Stops.

The 'Enter' and 'Exit' Stops are those where a rider will get on a Trip or leave a Trip, respectively, on their way from their original Origin Stop to their final Destination Stop.

Module: search/TripSearchResultSegment

Constructor

new TripSearchResultSegment(trip, enter, exit)

Source:

Create a new Trip Search Result Segment from the provided Trip

Parameters:
Name Type Description
trip Trip

The Trip that makes up this Segment

enter Stop | string

The Stop or Stop ID where the Segment starts

exit Stop | string

The Stop or Stop ID where the Segment ends

Members

destination :StopTime

Source:

The Trip Destination StopTime

Type:

enter :StopTime

Source:

The StopTime where the Segment starts

Type:

exit :StopTime

Source:

The StopTime where the Segment ends

Type:

origin :StopTime

Source:

The Trip Origin StopTime

Type:

travelTime :number

Source:

Travel Time (in minutes) on this Segment

Type:
  • number

trip :Trip

Source:

The Trip that makes up this Segment

Type: