package
0.0.0-20211020044736-f900221d1f8f
Repository: https://github.com/efritz09/go-caltrain.git
Documentation: pkg.go.dev
# Functions
GetDirectionFromSrcToDst returns the direction the train would go to get from src to dst.
GetStations returns a slice of all recognized stations in order from North to South.
New returns an instantiated CaltrainClient struct.
NewClient returns an instance of the APIClient511 struct.
ParseDirection returns a Direction from the string passed in.
ParseStation returns a Station from the string passed in.
# Constants
North defines Northbound trains.
South defines Southbound trains.
"22nd Street".
"Atherton".
"Bayshore".
"Belmont".
"Blossom Hill".
"Broadway".
"Burlingame".
"California Ave".
"Capitol".
"College Park".
"Gilroy".
"Hayward Park".
"Hillsdale".
"Lawrence".
"Menlo Park".
"Millbrae".
"Morgan Hill".
"Mountain View".
"Palo Alto".
"Redwood City".
"San Antonio".
"San Bruno".
"San Carlos".
"San Francisco".
"San Jose Diridon".
"San Martin".
"San Mateo".
"Santa Clara".
"South San Francisco".
"Stanford".
"Sunnyvale".
"Tamien".
# Structs
APIClient511 implements APIClient with 511.org requests.
APIError is returned on a failed API request for any reason other than too many requests.
APILimitError is returned on a failed API request when the failure reason is that the number of requests has exceeded the rate limit.
CaltrainClient provides the means for querying information about caltrain schedules, getting route information between stations, or getting live train status updates.
A Line specifies a Caltrain route line type (Bullet, Limited, Local, etc).
Route contains metadata for a given train and the stops that it will make on it's route.
TrainNotFoundError is returned when a provided train number does not exist in the current timetable.
TrainStatus provides the live status of the train.
TrainStop is a single stop on a route.
# Interfaces
APIClient is an interface for making requests.