Closed vikramgorla closed 6 years ago
Yes, it would. I never ran into issues with the rate limit because I only needed the data for one connection.
Thank you Fabian, I will submit a pull request and see how can we reduce number of calls made to api (e.g,. call the api only just before the next known train time in a rate optimized mode controlled by a flag,...) in home assistant.
Fabian,
It looks like
async_get_data
is proceeding to get connections info even if the response is not 200 (e.g,. ratelimiting with http 429) - do you think it helps if an error is raised when the quota is exceeded?Sample exception raised in homeassistant when the ratelimiter of opendata.ch blocks you
Response from opendata.ch
{"errors":[{"message":"Rate limit error from timetable.search.ch: Too many requests, try again tomorrow."}]}
Cheers,