Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BusIncident ¶
type BusIncident struct { DateUpdated string `json:"DateUpdated" xml:"DateUpdated"` Description string `json:"Description" xml:"Description"` IncidentID string `json:"IncidentID" xml:"IncidentID"` IncidentType string `json:"IncidentType" xml:"IncidentType"` RoutesAffected []string `json:"RoutesAffected" xml:"RoutesAffected>string"` }
type ElevatorIncident ¶
type ElevatorIncident struct { DateOutOfService string `json:"DateOutOfServ" xml:"DateOutOfServ"` DateUpdated string `json:"DateUpdated" xml:"DateUpdated"` // Deprecated: DisplayOrder response field is deprecated DisplayOrder int `json:"DisplayOrder" xml:"DisplayOrder"` EstimatedReturnToService string `json:"EstimatedReturnToService" xml:"EstimatedReturnToService"` LocationDescription string `json:"LocationDescription" xml:"LocationDescription"` StationCode string `json:"StationCode" xml:"StationCode"` StationName string `json:"StationName" xml:"StationName"` // Deprecated: SymptomCode response field is deprecated SymptomCode string `json:"SymptomCode" xml:"SymptomCode"` SymptomDescription string `json:"SymptomDescription" xml:"SymptomDescription"` // Deprecated: TimeOutOfService response field is deprecated, use time portion of DateOutOfService TimeOutOfService string `json:"TimeOutOfService" xml:"TimeOutOfService"` UnitName string `json:"UnitName" xml:"UnitName"` // Deprecated: UnitStatus response field is deprecated UnitStatus string `json:"UnitStatus" xml:"UnitStatus"` UnitType string `json:"UnitType" xml:"UnitType"` }
type GetBusIncidentsResponse ¶
type GetBusIncidentsResponse struct { XMLName xml.Name `json:"-" xml:"http://www.wmata.com BusIncidentsResp"` BusIncidents []BusIncident `json:"BusIncidents" xml:"BusIncidents>BusIncident"` }
type GetElevatorEscalatorOutagesResponse ¶
type GetElevatorEscalatorOutagesResponse struct { XMLName xml.Name `json:"-" xml:"http://www.wmata.com ElevatorIncidentsResp"` ElevatorIncidents []ElevatorIncident `json:"ElevatorIncidents" xml:"ElevatorIncidents>ElevatorIncident"` }
type GetRailIncidentsResponse ¶
type GetRailIncidentsResponse struct { XMLName xml.Name `json:"-" xml:"http://www.wmata.com IncidentsResp"` RailIncidents []RailIncident `json:"Incidents" xml:"Incidents>Incident"` }
type Incidents ¶
type Incidents interface { GetBusIncidents(route string) (*GetBusIncidentsResponse, error) GetOutages(stationCode string) (*GetElevatorEscalatorOutagesResponse, error) GetRailIncidents() (*GetRailIncidentsResponse, error) }
Incidents defines the methods available in the WMATA "Incidents" API
type RailIncident ¶
type RailIncident struct { DateUpdated string `json:"DateUpdated" xml:"DateUpdated"` // Deprecated: DelaySeverity response field is deprecated DelaySeverity string `json:"DelaySeverity" xml:"DelaySeverity"` Description string `json:"Description" xml:"Description"` // Deprecated: EmergencyText response field is deprecated EmergencyText string `json:"EmergencyText" xml:"EmergencyText"` // Deprecated: EndLocationFullName response field is deprecated EndLocationFullName string `json:"EndLocationFullName" xml:"EndLocationFullName"` IncidentID string `json:"IncidentID" xml:"IncidentID"` IncidentType string `json:"IncidentType" xml:"IncidentType"` // LinesAffected returns a semi-colon and space separated list of line codes - will be updated to an array eventually LinesAffected string `json:"LinesAffected" xml:"LinesAffected"` // Deprecated: PassengerDelay response field is deprecated PassengerDelay int `json:"PassengerDelay" xml:"PassengerDelay"` // Deprecated: StartLocationFullName response field is deprecated StartLocationFullName string `json:"StartLocationFullName" xml:"StartLocationFullName"` }
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service provides all API methods for the Incidents API
func NewService ¶
func NewService(client *wmata.Client, responseType wmata.ResponseType) *Service
NewService returns a new Incidents service with a reference to an existing wmata.Client
func (*Service) GetBusIncidents ¶
func (incidentService *Service) GetBusIncidents(route string) (*GetBusIncidentsResponse, error)
GetBusIncidents retrieves incidents and delays for a given bus route Documentation on service structure can be found here: https://developer.wmata.com/docs/services/54763641281d83086473f232/operations/54763641281d830c946a3d75
func (*Service) GetOutages ¶
func (incidentService *Service) GetOutages(stationCode string) (*GetElevatorEscalatorOutagesResponse, error)
GetOutages retrieves all reported elevator and escalator outages for a given station Documentation on service structure can be found here: https://developer.wmata.com/docs/services/54763641281d83086473f232/operations/54763641281d830c946a3d76?
func (*Service) GetRailIncidents ¶
func (incidentService *Service) GetRailIncidents() (*GetRailIncidentsResponse, error)
GetRailIncidents retrieves all reported rail incidents Documentation on service structure can be found here: https://developer.wmata.com/docs/services/54763641281d83086473f232/operations/54763641281d830c946a3d77?