Closed wawibu closed 3 months ago
I'll look into it. Working on some updates in the near future which will overhaul requests with the latest InControl API spec.
cool - thanks - and let me know if I can support you
The attached patch works for me:
This defines a new function get_tripse that uses the 'startDate' and 'stopDate' query strings defined in the JLR API. The two dates are URL-encoded datetime strings, the example uses '2021-06-01T00:00:00+0000' as the default starting date + time. You can obviously define your own limits in the calling function (but they need to be URL-encoded, i.e. replace ':' by '%3a' and '+' by %2b')
Looks very simple and obvious when you see it, but has taken me quite a bit of head-scratching and trial-and-error. I did NOT check with different daytime values or time zone offsets. You may try that yourself. Also, there may be a simpler / combined function definition for the standard get_trips function to have just one function instead of two. Unfortunately I am not Python savvy enough for this :-)
Edit: note that once you have the trip ID's you can get the complete routes data as well with get_trip - even though they happened in a distant past ... JLR keeps them all !
Thank you for the contribution. Feel free to create a PR :)
Fixed.
when I'm using get_trips I get right now "only" the last 775 trips. Within the app / web of InControl I see all trips - so I assume the data is still available. So I assume that it gets cut due to the data volume. Does someone know how to add a time frame to the request so that I would be able to pull them in different junks. Would be a one-time request only to get the full history and from there I could start building it up by adding only the new trips.