The following example is an ASCII representation of an Alert feed side-by-side with explanation of the elements.
header {
gtfs_realtime_version: "1.0"
incrementality: FULL_DATASET
timestamp: 1284457468
}
entity {
id: "0"
alert {
active_period {
start: 1284457468
end: 1284468072
}
informed_entity {
route_id: "219"
}
informed_entity {
stop_id: "16230"
}
cause: CONSTRUCTION
effect: DETOUR
url {
translation {
text: "http://www.sometransitagency/alerts"
language: "en"
}
}
header_text {
translation {
text: "Stop at Elm street is closed, temporary
stop at Oak street"
language: "en"
}
}
description_text {
translation {
text: "Due to construction at Elm street the
stop is closed. The temporary stop can be found
300 meters north at Oak street"
language: "en"
}
}
}
}
|
]- header information
]- version of speed specification. Currently "1.0"
]- determines whether dataset is incremental or full
]- the time where this dataset was generated on server
for determining the sequence of alert feeds
]- multiple entities can be included in the feed
]- unique identifier for the entity
]- "type" of the entity
|- multiple periods can be defined when alert is active
|- start time in POSIX epoch format
|- end time in POSIX epoch format
]- selects which GTFS entities will be affected
]- valid parameters: agency_id, route_id, route_type,
stop_id, trip (see TripDescriptor)
]- multiple selectors (informed_entity) can be given
]- cause of the alert - see gtfs-realtime.proto for valid values
]- effect of the alert - see gtfs-realtime.proto for valid values
]- the given url provides additional information
]- multiple languages/translations supported
page hosted outside of Google (at provider/agency, etc.)
]- header for the alert will be highlighted
]- multiple languages/translations supported
]- Alert description. Additional info to the header text
]- multiple languages/translations supported
|
Оригинал: https://developers.google.com/transit/gtfs-realtime/examples/alerts