Closed jamespfennell closed 4 years ago
Example of the realtime feeds in the NYC subway described using a Jinja template YAML:
feeds:
{%
for id_, mta_url_postfix in (
("7", "-7"),
("123456", ""),
("ACE", "-ace"),
("BDFM", "-bdfm"),
("G", "-g"),
("JZ", "-jz"),
("L", "-l"),
("NQRW", "-nqrw"),
("SIR", "-sir")
)
%}
{{ id_ }}:
http:
url: "https://api-endpoint.mta.info/Dataservice/mtagtfsfeeds/nyct%2Fgtfs{{ mta_url_postfix }}"
headers:
X-API-KEY: "{{ mta_api_key }}"
parser:
custom: 'transiter_nycsubway.gtfsrealtimeparser:parse'
auto_update:
period: 5 seconds
{% endfor %}
Done
Breaks the system config API so better sooner rather than later.