-
Notifications
You must be signed in to change notification settings - Fork 7
service alerts 1.0
sheldonabrown edited this page Sep 13, 2018
·
3 revisions
<!-- Service Alerts 1.0 DTD
This is the specification for Service Alerts as output by OneBusAway via RSS
-->
<!ELEMENT rss (channel)>
<!ATTLIST rss version CDATA #FIXED "2.0">
<!ELEMENT channel ((item+)|
(title,link,description,(language|copyright|
managingEditor|webMaster|pubDate|lastBuildDate|
category|generator|docs|cloud|ttl|image|
textInput|skipHours|skipDays|oba:ServiceAlerts)*))>
<!ELEMENT title (#PCDATA)>
<!ELEMENT link (#PCDATA)>
<!ELEMENT description (#PCDATA)>
<!Element oba:ServiceAlerts (oba:ServiceAlert+) >
<!Element oba:ServiceAlert (id,summary,description,reason,severity,(PublicationWindows|AffectsClauses)*)>
<!ELEMENT id (#PCDATA)>
<!ELEMENT summary (#PCDATA)>
<!ELEMENT description (#PCDATA)>
<!--
reason can be the following values:
(UNKNOWN_CAUSE|OTHER_CAUSE|TECHNICAL_PROBLEM|STRIKE|DEMONSTRATION|ACCIDENT|HOLIDAY|WEATHER|MAINTENANCE|CONSTRUCTION|POLICE_ACTIVITY|MEDICAL_EMERGENCY)
-->
<!ELEMENT oba:reason (#PCDATA)>
<!--
severity can be the following values:
(noImpact|undefined|unknown|verySlight|slight|normal|severe|verySevere)
-->
<!Element oba:severity (#PCDATA)>
<!Element oba:PublicationWindows (oba:TimeRange*) >
<!Element oba:TimeRange ((oba:from|oba:to)*) >
<!-- milliseconds since epoch -->
<!Element oba:from (#PCDATA) >
<!-- milliseconds since epoch -->
<!Element oba:to (#PCDATA) >
<!Element oba:AffectsClauses (oba:Affect*) >
<!Element oba:Affect (oba:Agency*) >
<!Element oba:Agency (oba:agencyId,(oba:routeId|oba:stopId|oba:tripId)*) >
<!ELEMENT oba:agencyId (#PCDATA)>
<!ELEMENT oba:routeId (#PCDATA)>
<!ELEMENT oba:stopId (#PCDATA)>
<!ELEMENT oba:tripId (#PCDATA)>
Here is an example Invocation for Tampa's Hillsborough Area Regional Transit:
wget -q -O - http://app.prod.obahart.org/rss/alerts?agencyId=Hillsborough%20Area%20Regional%20Transit | head -n 40
And the result:
<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:oba="https://github.com/camsys/onebusaway-application-modules/wiki/service-alerts-1.0" version="2.0">
<channel>
<title>OneBusAway Service Alerts</title>
<link />
<description>Service Information - Service Alerts</description>
<oba:ServiceAlerts>
<oba:ServiceAlert>
<oba:id>Hillsborough Area Regional Transit_d68ba63c-89df-47f3-9433-dc97810fd938</oba:id>
<oba:summary>Route 18 Detour</oba:summary>
<oba:description>Sandbag Traffic: No service to stops along 21st Ave near Al Barnes Park. Service is detouring via 23th Ave from 30th St to 26th St. Patrons can board Route 18 buses at either 21st Ave @ 26th St or 23rd Ave @ 30th St.</oba:description>
<oba:reason>WEATHER</oba:reason>
<oba:severity>normal</oba:severity>
<oba:AffectsClauses>
<oba:Affect>
<oba:Agency>
<oba:agency>Hillsborough Area Regional Transit</oba:agency>
<oba:routeId>18</oba:routeId>
</oba:Agency>
</oba:Affect>
</oba:AffectsClauses>
</oba:ServiceAlert>
<oba:ServiceAlert>
<oba:id>Hillsborough Area Regional Transit_13f6aa00-5a99-4e5b-b3c8-f454eb484c02</oba:id>
<oba:summary>Route 6 Detour</oba:summary>
<oba:description>Sandbag Traffic: No service to stops along 21st Ave near Al Barnes Park. Southbound service is detouring via 24th Ave from 34th St to 29th St, Northbound service is detouring via Columbus Dr from 26th St to 34th St. Patrons can board Route 6 buses in both directions at either 21st Ave @ 26th St or 21st Ave @ 34th St.</oba:description>
<oba:reason>WEATHER</oba:reason>
<oba:severity>normal</oba:severity>
<oba:AffectsClauses>
<oba:Affect>
<oba:Agency>
<oba:agency>Hillsborough Area Regional Transit</oba:agency>
<oba:routeId>6</oba:routeId>
</oba:Agency>
</oba:Affect>
</oba:AffectsClauses>
</oba:ServiceAlert>
….