Closed BluePixel4k closed 1 year ago
not possible with free Tankerkönig API
Okay sad, do you have any idea how expensive the Pro version is? At least I can't find anything concrete on their website. Such costs are of course not so great for an open source app, unless the users who want it pay for it.
no idea, probably only for large customers
I'm not an Android expert, but wouldn't it be possible to configure a background task running e.g. every 5...15mins, accessing the Tankerkönig API and storing the history for a selected station locally on your phone? To limit required storage space you could limit the history length to a certain interval and show the approximately required space.
"Regelmäßige, nicht explizit vom User initiierte Requests sind zu vermeiden"
@woheller69 Thanks for the quick response. I understand the need for limiting reoccurring server requests as stated in the terms. However I feel the server load should not increase too much if you limit the number of stations "subscribed to" to e.g. 1...3 per API key and request intervals to 15mins.
Nevertheless, I'm aware that the number of requests scales with the number of users.
Anyway, I just realized they added a GIT repo for daily historic data here. Would it be an option to include this in the app?
the download is 50 GB ...
@woheller69 Sure, for the whole repo. But one day data for all the stations is about 28MB. That's still quite some data and you'd have to download first and then filter by station id. So in theory historic data is available. However, I feel without a proper api to the data, the overhead is significant.
Another idea for this would be to store the prices whenever you get them anyway for displaying in app. Maybe averaging them with already stored prices for that time +-15min/30min from the last week or so and using that for an "average price history".
If the Tankerkönig API allows it, a price history of the single gas stations would be a practical function to be able to estimate how the price could still change on the day and how the trend looked like over the last day/weeks.
For example, like this: