new TripSearchResult( segments )

Description

Trip Search Result

This Class represents a single Trip Search Result. It consists of one or more Trip Search Result Segments, which are the individual Trips a rider would take to get from their original Origin Stop to their final Destination Stop.

Module: search/TripSearchResult

Parameters
Name Type Description
segments TripSearchResultSegment | Array.<TripSearchResultSegment>

Trip Search Result Segment(s)

Members


segments :Array.<TripSearchResultSegment>

Description

The Trip Search Result Segments


length :int

Description

The number of Trip Search Result Segments in this Result

Details
int

origin :StopTime

Description

The StopTime of the Trip Search's Origin Stop


destination :StopTime

Description

The StopTime of the Trip Search's Destination Stop


travelTime :int

Description

Total Travel Time (in minutes) - includes all segments and layovers

Details
int

transfers :Array.<TripSearchResultTransfer>

Description

List of Transfers

Methods


<static> sortByDeparture( a, b ) → {number}

Description

Sort Trip Search Results by their departure from the Origin

Parameters
Name Type Description
a TripSearchResult

first TripSearchResult

b TripSearchResult

second TripSearchResult

Returns

compare integer