Documentation ¶
Index ¶
Constants ¶
View Source
const ( URL_TEMPLATE = "https://nodejs-prod.rtd-denver.com/api/v2/nextride/stops/%d" API_KEY = "e7b926a1-cddb-46e7-bb27-6d134e5b5feb" BROWSER = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.5 Safari/605.1.15" )
View Source
const ( SCHEDULED = "SCHEDULED" SHUTTLE = "BUS SHUTTLE" CANCELLED = "CANCELLED" MS_TO_SEC = 1000 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Branch ¶
type Branch struct { ID string `json:"id"` RouteColor string `json:"routeColor"` RouteTextColor string `json:"routeTextColor"` RouteLongName string `json:"routeLongName"` RouteType *int `json:"routeType"` Mode string `json:"mode"` Headsign string `json:"headsign"` DirectionID *int `json:"directionId"` DirectionName string `json:"directionName"` StopName string `json:"stopName"` StopID string `json:"stopId"` AgencyID string `json:"agencyId"` DropoffOnly bool `json:"dropoffOnly"` UpcomingTrips []*Trip `json:"upcomingTrips"` }
type Rtd ¶
type Station ¶
type Station struct { ID string `json:"id"` Name string `json:"name"` Lat float64 `json:"lat"` Lng float64 `json:"lng"` ChildStops []string `json:"childStops"` ParentStationName string `json:"parentStationName"` ParentStationID string `json:"parentStationId"` Branches []*Branch `json:"branches"` }
func (*Station) GetUpcomingTrip ¶
type Trip ¶
type Trip struct { PredictedArrivalTime *int64 `json:"predictedArrivalTime"` PredictedDepartureTime *int64 `json:"predictedDepartureTime"` ScheduledArrivalTime *int64 `json:"scheduledArrivalTime"` ScheduledDepartureTime *int64 `json:"scheduledDepartureTime"` StopDropOffType *int `json:"stopDropOffType"` StopPickupType *int `json:"stopPickupType"` TripID string `json:"tripId"` TripStatus string `json:"tripStatus"` TripStopStatus string `json:"tripStopStatus"` Vehicle *Vehicle `json:"vehicle,omitempty"` }
func (*Trip) HasVehicle ¶ added in v0.3.0
func (*Trip) IsCancelled ¶ added in v0.3.0
func (*Trip) IsPredicted ¶ added in v0.3.0
func (*Trip) IsScheduled ¶
func (*Trip) IsShuttleBus ¶
type Vehicle ¶
type Vehicle struct { Bearing *float32 `json:"bearing"` ID string `json:"id"` Label string `json:"label"` Lat *float32 `json:"lat"` Lng *float32 `json:"lng"` Timestamp *int64 `json:"timestamp"` RouteTextColor string `json:"routeTextColor"` RouteColor string `json:"routeColor"` Mode string `json:"mode"` }
Click to show internal directories.
Click to hide internal directories.