vingerha / gtfs2

Support GTFS in Home Assistant GUI-only
https://github.com/vingerha/gtfs2
MIT License
65 stars 4 forks source link

Add support for an API Key on the static data source #91

Closed mark-lawrenson closed 1 week ago

mark-lawrenson commented 2 weeks ago

Hi there,

This PR adds support for an API Key to be used when accessing the static data source URL, in the same way as it is possible with the real time feeds.

Transport for NSW (Australia) has a seperate set of timetables which correspond with the real time feeds, and these timetables are only accessible with an API Key. With these changes, it is possible to configure the integration using the URL for those timetables, rather than the complete static file that does not correspond with the real time feeds.

I'm not sure if this will be common with any other transport operators, but it is of course still possible to not use an API Key, as the implementation is identical to how it was done for the real time feeds.

Details:

Kind regards, Mark

vingerha commented 2 weeks ago

Thanks for this, it was on my list but the only other static api-needing source till now (that I know of) was Sweden and there you can put the api in the url so...no need = no prio .... that was my take on it. I would like to ask you for one other thing and that is to add this to the service as well, the service allows you to update manually of via automation...hence

image

same / similar as this one

image

mark-lawrenson commented 1 week ago

@vingerha Awesome, thanks for mentioning that, I didn't notice the services! I've added that functionality now.

vingerha commented 1 week ago

I added it to 'main' now which will have a few other things that I am testing out too which will take a week or so to validate (I do have another life too). Expecting a new release by/in the weekend ...thanks again