adds webserer with endpoint /line?number=3 you need to specify a post body text using b64-encoded, semicolon-separated names of the stops index of stop name corresponds to returned value (led index)
66 lines
969 B
Go
66 lines
969 B
Go
package types
|
|
|
|
import "time"
|
|
|
|
|
|
type TripMeta struct {
|
|
TripId string
|
|
RouteShortName string
|
|
DisplayName string `json:"omitempty"`
|
|
}
|
|
|
|
type MapTrip struct {
|
|
Trips []TripMeta
|
|
RouteColor string
|
|
Mode string
|
|
Distance float32
|
|
Departure time.Time
|
|
Arrival time.Time
|
|
From Place
|
|
To Place
|
|
ScheduledDeparture time.Time
|
|
ScheduledArrival time.Time
|
|
RealTime bool
|
|
Polyline string
|
|
}
|
|
|
|
type Trip struct {
|
|
Duration int64
|
|
StartTime time.Time
|
|
EndTine time.Time
|
|
Transfers int
|
|
Id string
|
|
Legs []TripLeg
|
|
}
|
|
|
|
type TripLeg struct {
|
|
Mode string
|
|
From Place
|
|
To Place
|
|
Duration int64
|
|
StartTime time.Time
|
|
EndTime time.Time
|
|
ScheduledStartTime time.Time
|
|
ScheduledEndTime time.Time
|
|
RealTime bool
|
|
Scheduled bool
|
|
Distance float32
|
|
Headsign string
|
|
TripFrom Place
|
|
TripTo Place
|
|
}
|
|
|
|
type Place struct {
|
|
Name string
|
|
StopId string
|
|
Lat float32
|
|
Lon float32
|
|
Arrival time.Time
|
|
Departure time.Time
|
|
Track string
|
|
StopCode string
|
|
Description string
|
|
Cancelled bool
|
|
Modes []string
|
|
}
|