skylines
skylines copied to clipboard
Add the from_time query parameter to the live tracking endpoints
from_time
allows specifying a start time as a UNIX timestamp for the endpoints:
-
/live/<user_id>/json
, -
/live/<users_id>
, -
/tracking/latest.json
The endpoint /live/<user_id>/json
already supports a latest_update
query parameter which is the number of seconds since midnight of the day of the first point. If both from_time
and latest_update
are specified for this endpoint then the most recent condition wins (i.e. the conditions are ANDed).
Also specifying from_time
does not allow retrieving earlier fixes than the maximum age for the endpoints (12h for #1 and #2 and 6h for #3).
Could you please review @Turbo87.
fixes #2277
/cc @indyflyersoft
Hum... I'm not sure what's wrong with black here. I ran it on my code :(
Would be nice to have some more feedback in the logs. I'll look into it later.
Other changes in this PR:
- Add the
--diff
flag for black (lint test) so that error logs are actionable (different versions of black lead to different formatting), - Format the code with black (a few minor diffs),
- Added a sanity check of the
/live
endpoint as the code has been updated to useTrackingFix.get_from_time()
instead of the formerTrackingFix.get_latest()
.
Hey @Turbo87 is there anything missing for this to be reviewed, merged and deployed ?
No rush but please let me know if more work is expected from me here.
Thanks !
ping ?
No rush but please let me know if more work is expected from me here.
sorry, I'm missing time to do a proper review at the moment. lots of other stuff going on. 😞