Documentation
¶
Index ¶
- func SetLocation(name string) error
- type ArrayOfPublicMessage
- type ArrayOfRoute
- type ArrayOfStop
- type ArrayOfStopDeparture
- type ArrayOfVehicleLocation
- type AvailTime
- type Departure
- type Direction
- type Feed
- func (a *Feed) CurrentMessages() ([]PublicMessage, error)
- func (a *Feed) NewAvailRequest(action string) (*http.Request, error)
- func (a *Feed) Route(id int) (Route, error)
- func (a *Feed) SetClient(client *http.Client)
- func (a *Feed) StopDeparture(id int) (StopDeparture, error)
- func (a *Feed) Stops() ([]Stop, error)
- func (a *Feed) VisibleRoutes() ([]Route, error)
- type PublicMessage
- type Route
- type RouteDirection
- type RouteStop
- type Stop
- type StopDeparture
- type Trip
- type VehicleLocation
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetLocation ¶
Types ¶
type ArrayOfPublicMessage ¶
type ArrayOfPublicMessage struct {
PublicMessage []PublicMessage
}
type ArrayOfRoute ¶
type ArrayOfRoute struct {
Route []Route
}
type ArrayOfStop ¶
type ArrayOfStop struct {
Stop []Stop
}
type ArrayOfStopDeparture ¶
type ArrayOfStopDeparture struct {
StopDeparture StopDeparture
}
type ArrayOfVehicleLocation ¶
type ArrayOfVehicleLocation struct {
VehicleLocation []VehicleLocation
}
type AvailTime ¶
func (*AvailTime) UnmarshalXML ¶
type Feed ¶
type Feed struct {
BaseURL string
// contains filtered or unexported fields
}
func (*Feed) CurrentMessages ¶
func (a *Feed) CurrentMessages() ([]PublicMessage, error)
func (*Feed) NewAvailRequest ¶
Make a new GET request to the requested API endpoint
func (*Feed) StopDeparture ¶
func (a *Feed) StopDeparture(id int) (StopDeparture, error)
func (*Feed) VisibleRoutes ¶
type PublicMessage ¶
type Route ¶
type Route struct {
ServerId int
RouteId int
RouteRecordId int
ShortName string
LongName string
RouteAbbreviation string
Color string
TextColor string
IsVisible bool
SortOrder int
RouteTraceFilename string
IsHeadway bool
IncludeInGoogle bool
Stops []Stop `xml:"Stops>Stop"`
RouteStops []RouteStop `xml:"RouteStops>RouteStop"`
Directions []Direction `xml:"Directions>Direction"`
Vehicles []VehicleLocation `xml:"VehicleLocations>VehicleLocation"`
}
type RouteDirection ¶
type StopDeparture ¶
type StopDeparture struct {
StopId int
StopRecordId int
RouteDirections []RouteDirection `xml:"RouteDirections>RouteDirection"`
}
type VehicleLocation ¶
type VehicleLocation struct {
VehicleId int
Name string
Latitude float64
Longitude float64
RouteId int
TripId int
RunId int
Direction string
DirectionLong string
Heading int
Deviation float64
OpStatus string
CommStatus string
GPSStatus int
LastStop string
LastUpdated AvailTime
DisplayStatus string
BlockFareboxId int
}
Click to show internal directories.
Click to hide internal directories.